Use DevController.allocateDeviceID rather than using a local variable.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@ewan committed 2005-09-19 13:44:05 +01:00
1 parent 0c0fe2fcc7
commit 60603ce320
1 file changed
+1 -9
+1 -9
View File
@@ -25,9 +25,6 @@
from xen.xend.server.DevController import DevController
next_devid = 1
class UsbifController(DevController):
"""USB device interface controller. Handles all USB devices
for a domain.
@@ -42,9 +39,4 @@ class UsbifController(DevController):
def getDeviceDetails(self, _):
"""@see DevController.getDeviceDetails"""
global next_devid
devid = next_devid
next_devid += 1
return (devid, {}, {})
return (self.allocateDeviceID(), {}, {})
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.