Skip to contentSkip to conversation

xm list ERROR_INVALID_DOMAIN

PATCH In review Shaun R. 2 participants 3 messages Sep 17, 2008 – Sep 20, 2008

lore
Share & tools
lore

Shaun R.

author
#0 lore raw

PATCH 1/1 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

tools/python/xen/xm/main.py Wed Sep 17 06:20:38 2008 -0700 renamed from tools/python/xen/xm/main.py Mon Sep 15 11:42:31 2008 +0100 +1 -0
diff -r 536475e491cc tools/python/xen/xm/main.py
@@ -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)
author
#1 lore raw

just curious, did i go about this the right way to get it applied?

~Shaun