From: cl349@firebug.cl.cam.ac.uk Date: Mon, 29 Aug 2005 13:58:46 +0000 (+0000) Subject: Fix "bogus" check by moving it inside the length check. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16814^2~85^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=82e2e63c607c0fa29cbf6c117f4905358971e039;p=xen.git Fix "bogus" check by moving it inside the length check. Signed-off-by: Ryan Harper Signed-off-by: Christian Limpach --- diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 5c8e4b01ff..92782d2ae9 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -715,9 +715,9 @@ def main(argv=sys.argv): err("Most commands need root access. Please try again as root") sys.exit(1) except XendError, ex: - if args[0] == "bogus": - args.remove("bogus") if len(args) > 0: + if args[0] == "bogus": + args.remove("bogus") handle_xend_error(argv[1], args[0], ex) else: print "Unexpected error:", sys.exc_info()[0]