Fix "bogus" check by moving it inside the length check.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Mon, 29 Aug 2005 13:58:46 +0000 (13:58 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Mon, 29 Aug 2005 13:58:46 +0000 (13:58 +0000)
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xm/main.py

index 5c8e4b01ff28cd4452d6b67ea6f6408097e135fb..92782d2ae9a47aa742182b45e545c5a0e0f239f2 100644 (file)
@@ -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]