From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Shaun R." Subject: [PATCH] xm list ERROR_INVALID_DOMAIN Date: Wed, 17 Sep 2008 11:25:48 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This patch will make xm return a exit code of 3 if `xm list ` 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)