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-changelog

[Xen-changelog] [xen-unstable] Raise an exception in xm_block_detach if

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Raise an exception in xm_block_detach if using Xen-API and it fails -- this
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2007 13:30:25 -0700
Delivery-date: Tue, 20 Mar 2007 13:31:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174412178 0
# Node ID 3fd9b0c71b8c687b108a8bf671c9c4fc47046a0a
# Parent  92f14ace389cd7bdb3809c149e584aa331b92958
Raise an exception in xm_block_detach if using Xen-API and it fails -- this
ensures that the exit status properly set.

Signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xm/main.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 92f14ace389c -r 3fd9b0c71b8c tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Mar 20 17:34:34 2007 +0000
+++ b/tools/python/xen/xm/main.py       Tue Mar 20 17:36:18 2007 +0000
@@ -1962,7 +1962,8 @@ def xm_block_detach(args):
             if len(server.xenapi.VDI.get_VBDs(vdi_ref)) <= 0:
                 server.xenapi.VDI.destroy(vdi_ref)
         else:
-            print "Cannot find device '%s' in domain '%s'" % (dev,dom)
+            raise OptionError("Cannot find device '%s' in domain '%s'"
+                              % (dev,dom))
     else:
         try:
             detach(args, 'block-detach', 'vbd')

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Raise an exception in xm_block_detach if using Xen-API and it fails -- this, Xen patchbot-unstable <=