fix releaseDevices
This commit is contained in:
parent
4075cd78b4
commit
09764feaa8
@ -216,6 +216,14 @@ class driver():
|
||||
self.uDevices[fd].close()
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
del(self.iDevices[fd])
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
del(self.uDevices[fd])
|
||||
except:
|
||||
pass
|
||||
def hasIDevices(self):
|
||||
if not self._initialized:
|
||||
return False
|
||||
@ -228,7 +236,8 @@ class driver():
|
||||
def releaseDevices(self):
|
||||
if not self.hasIDevices():
|
||||
return
|
||||
for fd in self.iDevices:
|
||||
devices = self.iDevices.copy()
|
||||
for fd in devices:
|
||||
self.removeDevice(fd)
|
||||
self.iDevices.clear()
|
||||
self.uDevices.clear()
|
||||
|
Loading…
Reference in New Issue
Block a user