From: Ewan Mellor Date: Thu, 2 Nov 2006 23:01:32 +0000 (+0000) Subject: I found a small bug in xenmon. Even if I gave xenmon a wrong X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e34b744e2c6373ac44ba3c8b729d1f6e03ab6832;p=xen.git 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. usage: xenmon.py [options] xenmon.py: error: No parameter required Signed-off-by: Masaki Kanno --- diff --git a/tools/xenmon/xenmon.py b/tools/xenmon/xenmon.py index e6b8ce9e24..d828834a10 100644 --- a/tools/xenmon/xenmon.py +++ b/tools/xenmon/xenmon.py @@ -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)