This commit is contained in:
chrys 2018-05-21 20:15:43 +02:00
parent 6981145a8c
commit d2c53e2d58

View File

@ -167,14 +167,18 @@ class driver(inputDriver):
eventType = evdev.events
for deviceFile in deviceFileList:
try:
self.env['runtime']['debug'].writeDebugOut('Debug: not deviceFile',debug.debugLevel.ERROR)
if not deviceFile:
continue
self.env['runtime']['debug'].writeDebugOut('Debug: deviceFile == '' ',debug.debugLevel.ERROR)
if deviceFile == '':
continue
self.env['runtime']['debug'].writeDebugOut('Debug: deviceFile in iDevicesFiles ',debug.debugLevel.ERROR)
if deviceFile in iDevicesFiles:
continue
try:
self.env['runtime']['debug '].writeDebugOut('Debug: open(deviceFile)',debug.debugLevel.ERROR)
open(deviceFile)
except Exception as e:
self.env['runtime']['debug'].writeDebugOut("Not readable Inputdevice : " + deviceFile +' ' + str(e),debug.debugLevel.ERROR)
@ -184,6 +188,7 @@ class driver(inputDriver):
# 1 Keys
try:
self.env['runtime']['debug '].writeDebugOut('Debug: currDevice = evdev.InputDevice(deviceFile)',debug.debugLevel.ERROR)
currDevice = evdev.InputDevice(deviceFile)
except:
continue
@ -195,12 +200,15 @@ class driver(inputDriver):
continue
if 'BRLTTY' in currDevice.name.upper():
continue
self.env['runtime']['debug '].writeDebugOut('Debug: namecheck',debug.debugLevel.ERROR)
except:
pass
cap = currDevice.capabilities()
self.env['runtime']['debug '].writeDebugOut('Debug: cap = currDevice.capabilities()',debug.debugLevel.ERROR)
if mode in ['ALL','NOMICE']:
if eventType.EV_KEY in cap:
self.env['runtime']['debug '].writeDebugOut('Debug: eventType.EV_KEY in cap',debug.debugLevel.ERROR)
if 116 in cap[eventType.EV_KEY] and len(cap[eventType.EV_KEY]) < 10:
self.env['runtime']['debug'].writeDebugOut('Device Skipped (has 116):' + currDevice.name,debug.debugLevel.INFO)
continue