[XEND] Remove hard tabs from destroyDevice()

Reported by Hollis Blanchard.

Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
atse@norwich.uk.xensource.com committed 2006-09-22 15:56:19 +01:00
1 parent 8554ba8909
commit 15473a42cf
1 file changed
+10 -9
+10 -9
View File
@@ -1098,15 +1098,16 @@ class XendDomainInfo:
## public:
def destroyDevice(self, deviceClass, devid):
if type(devid) is str:
devicePath = '%s/device/%s' % (self.dompath, deviceClass)
for entry in xstransact.List(devicePath):
backend = xstransact.Read('%s/%s' % (devicePath, entry), "backend")
devName = xstransact.Read(backend, "dev")
if devName == devid:
# We found the integer matching our devid, use it instead
devid = entry
break
if type(devid) is str:
devicePath = '%s/device/%s' % (self.dompath, deviceClass)
for entry in xstransact.List(devicePath):
backend = xstransact.Read('%s/%s' % (devicePath, entry),
"backend")
devName = xstransact.Read(backend, "dev")
if devName == devid:
# We found the integer matching our devid, use it instead
devid = entry
break
return self.getDeviceController(deviceClass).destroyDevice(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.