ia64/xen-unstable

changeset 13076:fb6db3c9ae74

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>
author Ewan Mellor <ewan@xensource.com>
date Sat Dec 16 12:52:18 2006 +0000 (2006-12-16)
parents c38370be1e0e
children f944e13ce50a
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Wed Dec 13 17:45:50 2006 -0800
     1.2 +++ b/tools/python/xen/xm/main.py	Sat Dec 16 12:52:18 2006 +0000
     1.3 @@ -1556,7 +1556,11 @@ def detach(args, command, deviceClass):
     1.4  
     1.5  
     1.6  def xm_block_detach(args):
     1.7 -    detach(args, 'block-detach', 'vbd')
     1.8 +    try:
     1.9 +        detach(args, 'block-detach', 'vbd')
    1.10 +        return
    1.11 +    except:
    1.12 +        pass
    1.13      detach(args, 'block-detach', 'tap')
    1.14  
    1.15