[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Catch ValueError and OverflowError, to diagnose bad arguments.
# HG changeset patch # User emellor@xxxxxxxxxxxxxxxxxxxxxx # Node ID 3e221d43cf1998ba67783da7e81582b6aae70851 # Parent bd1a0b2bb2d4596227951ad6d36cb4fcc2d00a8e Catch ValueError and OverflowError, to diagnose bad arguments. Signed-off-by: Hiroyuki Yamamoto <yamamoto.hiroyu@xxxxxxxxxxxxxx> Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx> --- tools/python/xen/xm/main.py | 3 +++ 1 files changed, 3 insertions(+) diff -r bd1a0b2bb2d4 -r 3e221d43cf19 tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Thu Jun 15 11:35:23 2006 +0100 +++ b/tools/python/xen/xm/main.py Thu Jun 15 11:52:23 2006 +0100 @@ -1193,6 +1193,9 @@ def main(argv=sys.argv): else: print >>sys.stderr, "Error: %s" % ex.faultString sys.exit(1) + except (ValueError, OverflowError): + err("Invalid argument.") + usage(argv[1]) except: print "Unexpected error:", sys.exc_info()[0] print _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |