mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Fix the exception thrown when doing, for example, "xm domid" on a non-existent domain.
Signed-off-by: Dan Smith <danms@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
6fd73f2638
commit
47428adff6
1 file changed
+3
-1
@@ -665,8 +665,10 @@ 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:
|
||||
handle_xend_error(argv[1], args[1], ex)
|
||||
handle_xend_error(argv[1], args[0], ex)
|
||||
else:
|
||||
print "Unexpected error:", sys.exc_info()[0]
|
||||
print
|
||||
|
||||