xend: Fix bugzilla bug #1253.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 20 May 2008 13:18:32 +0000 (14:18 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 20 May 2008 13:18:32 +0000 (14:18 +0100)
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendConfig.py

index cdb4c1c6f381d27974810ffc245e534783c0997c..8c76a11085cf15e6eb5701ec7733d41f2012f2bf 100644 (file)
@@ -1143,10 +1143,11 @@ class XendConfig(dict):
                 if o_dev_type == 'vbd' or o_dev_type == 'tap':
                     blkdev_file = blkdev_uname_to_file(dev_uname)
                     o_dev_uname = sxp.child_value(o_dev_info, 'uname')
-                    o_blkdev_file = blkdev_uname_to_file(o_dev_uname)
-                    if blkdev_file == o_blkdev_file:
-                        raise XendConfigError('The file "%s" is already used' %
-                                              blkdev_file)
+                    if o_dev_uname != None:
+                        o_blkdev_file = blkdev_uname_to_file(o_dev_uname)
+                        if blkdev_file == o_blkdev_file:
+                            raise XendConfigError('The file "%s" is already used' %
+                                                  blkdev_file)
                     o_blkdev_name = sxp.child_value(o_dev_info, 'dev')
                     o_devid = self._blkdev_name_to_number(o_blkdev_name)
                     if o_devid != None and devid == o_devid: