remove devices we cannot read anymore
This commit is contained in:
parent
ca5ce66f31
commit
23edc5eaa7
@ -333,6 +333,7 @@ class driver(inputDriver):
|
|||||||
self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO)
|
||||||
except IOError:
|
except IOError:
|
||||||
self.gDevices[fd] = True
|
self.gDevices[fd] = True
|
||||||
|
self.removeDevice(fd)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grabing not possible: ' + str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grabing not possible: ' + str(e),debug.debugLevel.ERROR)
|
||||||
return False
|
return False
|
||||||
@ -346,6 +347,7 @@ class driver(inputDriver):
|
|||||||
self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: ungrab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: ungrab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO)
|
||||||
except IOError:
|
except IOError:
|
||||||
self.gDevices[fd] = False
|
self.gDevices[fd] = False
|
||||||
|
self.removeDevice(fd)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user