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>
This commit is contained in:
Ewan Mellor committed 2006-12-16 12:52:18 +00:00
1 parent 24a6ed484b
commit 324ad7a4a8
1 file changed
+5 -1
+5 -1
View File
@@ -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')
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.