All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shaun R." <mailinglists@unix-scripts.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] xm list ERROR_INVALID_DOMAIN
Date: Wed, 17 Sep 2008 11:25:48 -0700	[thread overview]
Message-ID: <gari3o$bst$1@ger.gmane.org> (raw)

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)

             reply	other threads:[~2008-09-17 18:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17 18:25 Shaun R. [this message]
2008-09-19 19:32 ` [PATCH] xm list ERROR_INVALID_DOMAIN Shaun R.
2008-09-20  8:06   ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gari3o$bst$1@ger.gmane.org' \
    --to=mailinglists@unix-scripts.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.