Don't try and call DevController if we can't destroy a device ourselves,

because we are already inside the ValueError exception handler, so we know that
the give device identifier is not an integer, and DevController.destroyDevice
only accepts integers.  Fixes bug #315.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@ewan committed 2005-10-12 12:56:52 +01:00
1 parent c74a06ff24
commit 0041d06c95
1 file changed
+1 -3
+1 -3
View File
@@ -96,6 +96,4 @@ class BlkifController(DevController):
if self.readBackend(i, 'dev') == devid:
DevController.destroyDevice(self, i)
return
# Try this, but it's almost certainly going to throw VmError,
# since we can't find the device.
DevController.destroyDevice(self, int(devid))
raise VmError("Device %s not connected" % devid)
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.