[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xm list ERROR_INVALID_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.

~Shaun Reitan



diff -r 536475e491cc tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Mon Sep 15 11:42:31 2008 +0100
+++ b/tools/python/xen/xm/main.py       Wed Sep 17 06:20:38 2008 -0700
@@ -2926,6 +2926,7 @@
    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)




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.