Update evdevDriver.py

This commit is contained in:
chrys 2019-10-04 17:57:45 +02:00 committed by GitHub
parent 4365d0c306
commit 882889ee1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -347,8 +347,9 @@ class driver(inputDriver):
self.gDevices[fd] = True self.gDevices[fd] = True
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 return False
#self.removeDevice(fd) # 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
@ -361,8 +362,9 @@ class driver(inputDriver):
self.gDevices[fd] = False self.gDevices[fd] = False
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 return False
#self.removeDevice(fd) # self.gDevices[fd] = False
# #self.removeDevice(fd)
except Exception as e: except Exception as e:
return False return False
return True return True