From: Keir Fraser Date: Tue, 20 May 2008 13:18:32 +0000 (+0100) Subject: xend: Fix bugzilla bug #1253. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14210^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4f050d52f57ce5681f535fb924e4cea6c41df1b0;p=xen.git xend: Fix bugzilla bug #1253. Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index cdb4c1c6f3..8c76a11085 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -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: