WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] I found a small bug in xenmon. Even if I gave xenmon a wrong
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 06 Nov 2006 16:50:16 +0000
Delivery-date: Mon, 06 Nov 2006 08:50:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] I found a small bug in xenmon. Even if I gave xenmon a wrong, Xen patchbot-unstable <=