WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xm list ERROR_INVALID_DOMAIN

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xm list ERROR_INVALID_DOMAIN
From: "Shaun R." <mailinglists@xxxxxxxxxxxxxxxx>
Date: Wed, 17 Sep 2008 11:25:48 -0700
Delivery-date: Wed, 17 Sep 2008 11:26:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>