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] fail nicely when passing unknown option to xm list

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] fail nicely when passing unknown option to xm list
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Aug 2005 10:18:09 -0400
Delivery-date: Thu, 18 Aug 2005 14:18:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 vh249@xxxxxxxxxxxxxxxxxxxxxx
# Node ID cb5648ba5821a3303fdb9e9cc91e6ce15d125c86
# Parent  1a94949348ff52863b9fbef4eaf102c7e46a345d
fail nicely when passing unknown option to xm list

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 1a94949348ff -r cb5648ba5821 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Aug 18 10:41:55 2005
+++ b/tools/python/xen/xm/main.py       Thu Aug 18 11:45:54 2005
@@ -200,7 +200,11 @@
 def xm_list(args):
     use_long = 0
     show_vcpus = 0
-    (options, params) = getopt(args, 'lv', ['long','vcpus'])
+    try:
+        (options, params) = getopt(args, 'lv', ['long','vcpus'])
+    except GetoptError, opterr:
+        err(opterr)
+        sys.exit(1)
     
     n = len(params)
     for (k, v) in options:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] fail nicely when passing unknown option to xm list, Xen patchbot -unstable <=