close filehandle

This commit is contained in:
chrys87 2018-05-23 15:49:08 +02:00 committed by GitHub
parent cb596e8f60
commit 03e755b91f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,7 +182,8 @@ class driver(inputDriver):
continue
self.env['runtime']['debug'].writeDebugOut('open(deviceFile)',debug.debugLevel.ERROR)
try:
open(deviceFile)
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