Raise an exception if blkdev_name_to_number fails, to improve the error message.

Fix came from Glauber de Oliveira Costa, and is one half of xen-unstable
11831:f5321161c649fe4f07027250c4a1f3c4b5fc2ed9.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2006-10-28 17:58:00 +01:00
1 parent 6b24e654ee
commit f652cfbe00
1 file changed
+3
+3
View File
@@ -80,6 +80,9 @@ class BlkifController(DevController):
'acm_policy' : policy})
devid = blkif.blkdev_name_to_number(dev)
if not devid:
raise VmError('Unable to find number for device (%s)' % (dev))
front = { 'virtual-device' : "%i" % devid,
'device-type' : dev_type
}
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.