mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xm list: Return unique exit code for non-existent domain
This patch will make xm return a exit code of 3 if `xm list <non_existant_domain>` 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." <mailinglists@unix-scripts.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
549e1d9ec5
commit
bbc10fbb40
1 file changed
+1
@@ -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)
|
||||
|
||||