diff options
author | Ewan Mellor <ewan@xensource.com> | 2006-11-02 23:01:32 +0000 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2006-11-02 23:01:32 +0000 |
commit | e34b744e2c6373ac44ba3c8b729d1f6e03ab6832 (patch) | |
tree | cf555d043566d737c94d646e3655850df130d199 /tools/xenmon | |
parent | 7be8e242eee700afd5f498f0bb69a03957b6fd36 (diff) | |
download | xen-e34b744e2c6373ac44ba3c8b729d1f6e03ab6832.tar.gz xen-e34b744e2c6373ac44ba3c8b729d1f6e03ab6832.tar.bz2 xen-e34b744e2c6373ac44ba3c8b729d1f6e03ab6832.zip |
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 <kanno.masaki@jp.fujitsu.com>
Diffstat (limited to 'tools/xenmon')
-rw-r--r-- | tools/xenmon/xenmon.py | 4 |
1 files changed, 3 insertions, 1 deletions
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) |