# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1166273538 0
# Node ID fb6db3c9ae7408b472ec0743c318de870b41006a
# Parent c38370be1e0e1197213a8f22a5ec8fbd9ba875b0
An error occurs if the first detach was successful and the 2nd one is
not (of course). Return if the 1st detach is successful, try the 2nd one
if it was not successful. Throw an error if the 2nd one fails.
This should also fix problems I am currently seeing in the xm-test
suite.
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
tools/python/xen/xm/main.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
diff -r c38370be1e0e -r fb6db3c9ae74 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py Wed Dec 13 17:45:50 2006 -0800
+++ b/tools/python/xen/xm/main.py Sat Dec 16 12:52:18 2006 +0000
@@ -1556,7 +1556,11 @@ def detach(args, command, deviceClass):
def xm_block_detach(args):
- detach(args, 'block-detach', 'vbd')
+ try:
+ detach(args, 'block-detach', 'vbd')
+ return
+ except:
+ pass
detach(args, 'block-detach', 'tap')
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|