ia64/xen-unstable

changeset 17683:4b4b829e34a2

xend: Fix bugzilla bug #1253.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 20 14:18:32 2008 +0100 (2008-05-20)
parents fd5b2ed9574a
children 34ac0d3b5bfb
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Tue May 20 14:17:15 2008 +0100
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Tue May 20 14:18:32 2008 +0100
     1.3 @@ -1143,10 +1143,11 @@ class XendConfig(dict):
     1.4                  if o_dev_type == 'vbd' or o_dev_type == 'tap':
     1.5                      blkdev_file = blkdev_uname_to_file(dev_uname)
     1.6                      o_dev_uname = sxp.child_value(o_dev_info, 'uname')
     1.7 -                    o_blkdev_file = blkdev_uname_to_file(o_dev_uname)
     1.8 -                    if blkdev_file == o_blkdev_file:
     1.9 -                        raise XendConfigError('The file "%s" is already used' %
    1.10 -                                              blkdev_file)
    1.11 +                    if o_dev_uname != None:
    1.12 +                        o_blkdev_file = blkdev_uname_to_file(o_dev_uname)
    1.13 +                        if blkdev_file == o_blkdev_file:
    1.14 +                            raise XendConfigError('The file "%s" is already used' %
    1.15 +                                                  blkdev_file)
    1.16                      o_blkdev_name = sxp.child_value(o_dev_info, 'dev')
    1.17                      o_devid = self._blkdev_name_to_number(o_blkdev_name)
    1.18                      if o_devid != None and devid == o_devid: