[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] fail nicely when passing unknown option to xm list
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |