[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Raise an exception in xm_block_detach if using Xen-API and it fails -- this
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |