remove debug
This commit is contained in:
parent
b4ce1ecf80
commit
ac48ecc89b
@ -165,29 +165,24 @@ class driver(inputDriver):
|
||||
eventType = evdev.events
|
||||
for deviceFile in deviceFileList:
|
||||
try:
|
||||
self.env['runtime']['debug'].writeDebugOut('loop start',debug.debugLevel.ERROR)
|
||||
if not deviceFile:
|
||||
continue
|
||||
if deviceFile == '':
|
||||
continue
|
||||
if deviceFile in iDevicesFiles:
|
||||
continue
|
||||
self.env['runtime']['debug'].writeDebugOut('open(deviceFile)',debug.debugLevel.ERROR)
|
||||
try:
|
||||
with open(deviceFile) as f:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut("Not readable Inputdevice : " + deviceFile +' ' + str(e),debug.debugLevel.ERROR)
|
||||
continue
|
||||
# 3 pos absolute
|
||||
# 2 pos relative
|
||||
# 1 Keys
|
||||
self.env['runtime']['debug'].writeDebugOut('currDevice = evdev.InputDevice(deviceFile)',debug.debugLevel.ERROR)
|
||||
try:
|
||||
currDevice = evdev.InputDevice(deviceFile)
|
||||
except:
|
||||
continue
|
||||
self.env['runtime']['debug'].writeDebugOut('naming',debug.debugLevel.ERROR)
|
||||
try:
|
||||
if currDevice.name.upper() in ['','SPEAKUP','PY-EVDEV-UINPUT']:
|
||||
continue
|
||||
@ -195,15 +190,11 @@ class driver(inputDriver):
|
||||
continue
|
||||
if 'BRLTTY' in currDevice.name.upper():
|
||||
continue
|
||||
self.env['runtime']['debug'].writeDebugOut('loaded name:'+ str(currDevice.name),debug.debugLevel.ERROR)
|
||||
except:
|
||||
pass
|
||||
self.env['runtime']['debug'].writeDebugOut('cap = currDevice.capabilities()',debug.debugLevel.ERROR)
|
||||
cap = currDevice.capabilities()
|
||||
self.env['runtime']['debug'].writeDebugOut('cap = currDevice.capabilities() fin',debug.debugLevel.ERROR)
|
||||
if mode in ['ALL','NOMICE']:
|
||||
if eventType.EV_KEY in cap:
|
||||
self.env['runtime']['debug'].writeDebugOut('eventType.EV_KEY in cap NoOfCaps: '+ str(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
|
||||
@ -224,7 +215,6 @@ class driver(inputDriver):
|
||||
elif currDevice.name.upper() in mode.split(','):
|
||||
self.addDevice(currDevice)
|
||||
self.env['runtime']['debug'].writeDebugOut('Device added (Name):' + self.iDevices[currDevice.fd].name,debug.debugLevel.INFO)
|
||||
self.env['runtime']['debug'].writeDebugOut('loop end',debug.debugLevel.ERROR)
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut("Device Skipped (Exception): " + deviceFile +' ' + currDevice.name +' '+ str(e),debug.debugLevel.INFO)
|
||||
self.iDeviceNo = len(evdev.list_devices())
|
||||
|
Loading…
Reference in New Issue
Block a user