Fix parameter check of xenmon
PATCH 1/1 Fix parameter check of xenmon
Hi,
I found a small bug in xenmon. Even if I gave xenmon a wrong parameter, xenmon did not become an error.
This patch adds a checking of wrong parameter into xenmon. If wrong parameter is given, xenmon shows the following error messages.
# xenmon.py xyz usage: xenmon.py [options]
xenmon.py: error: No parameter required
Best regards,
Kan
tools/xenmon/xenmon.py +3 -1
@@ -653,7 +653,6 @@ def writelog(): # start xenbaked def start_xenbaked(): global options - global args os.system("killall -9 xenbaked") # assumes that xenbaked is in your path
@@ -672,6 +671,9 @@ def main(): parser = setup_cmdline_parser() (options, args) = parser.parse_args() + + if len(args): + parser.error("No parameter required") if options.mspersample < 0: parser.error("option --ms_per_sample: invalid negative value: '%d'" % options.mspersample)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Ewan Mellor
AppliedOn Thu, Nov 02, 2006 at 01:41:01PM +0900, Masaki Kanno wrote:
Content-Description: Mail message body
Quoted 9 lines
Hi,
I found a small bug in xenmon. Even if I gave xenmon a wrong parameter, xenmon did not become an error.
This patch adds a checking of wrong parameter into xenmon. If wrong parameter is given, xenmon shows the following error messages.
Quoted 7 lines
# xenmon.py xyz usage: xenmon.py [options]
xenmon.py: error: No parameter requiredSigned-off-by Masaki Kanno <[email protected]>
Applied, thanks Kan.
Ewan.