mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
[XEND] Remove hard tabs from destroyDevice()
Reported by Hollis Blanchard. Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
8554ba8909
commit
15473a42cf
1 file changed
+10
-9
@@ -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)
|
||||
|
||||
|
||||
|
||||