diff options
author | Ewan Mellor <ewan@xensource.com> | 2006-12-16 12:52:18 +0000 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2006-12-16 12:52:18 +0000 |
commit | 324ad7a4a8010ae406eccb0d42581db35418c9b4 (patch) | |
tree | 1e5c505402fffc6a901410871386aeeb7761bde7 | |
parent | 24a6ed484bf95f363a52b226e1edcd775eef1812 (diff) | |
download | xen-324ad7a4a8010ae406eccb0d42581db35418c9b4.tar.gz xen-324ad7a4a8010ae406eccb0d42581db35418c9b4.tar.bz2 xen-324ad7a4a8010ae406eccb0d42581db35418c9b4.zip |
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@us.ibm.com>
-rw-r--r-- | tools/python/xen/xm/main.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index a503835cf5..42e6f74899 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -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') |