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:
Keir Fraser committed 2008-09-18 10:41:41 +01:00
1 parent 549e1d9ec5
commit bbc10fbb40
1 file changed
+1
+1
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.