[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] I found a small bug in xenmon. Even if I gave xenmon a wrong



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 7818629c336c0bea690f4ea54de5c9f72abe0146
# Parent  dd62270df2ad69ace6b42dd5aecba0b42c593072
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@xxxxxxxxxxxxxx>
---
 tools/xenmon/xenmon.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r dd62270df2ad -r 7818629c336c tools/xenmon/xenmon.py
--- a/tools/xenmon/xenmon.py    Thu Nov 02 22:24:20 2006 +0000
+++ b/tools/xenmon/xenmon.py    Thu Nov 02 23:01:32 2006 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.