From: Keir Fraser Date: Thu, 18 Sep 2008 09:41:41 +0000 (+0100) Subject: xm list: Return unique exit code for non-existent domain X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14101^2~54 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bbc10fbb403df648ea3f1cdb7729ff5188d955b4;p=xen.git xm list: Return unique exit code for non-existent domain This patch will make xm return a exit code of 3 if `xm list ` is done rather than the generic code of 1. I used 3 because XendClient had a macro setup pointing ERROR_INVALID_DOMAIN to 3. From: "Shaun R." Signed-off-by: Keir Fraser --- diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 596b943ef4..968828e1b3 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -2926,6 +2926,7 @@ def _run_cmd(cmd, cmd_name, args): except xmlrpclib.Fault, ex: if ex.faultCode == XendClient.ERROR_INVALID_DOMAIN: err("Domain '%s' does not exist." % ex.faultString) + return False, ex.faultCode else: err(ex.faultString) _usage(cmd_name)