From 882889ee1c0c28b6c31268c376df573f83a69280 Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 4 Oct 2019 17:57:45 +0200 Subject: [PATCH] Update evdevDriver.py --- src/fenrirscreenreader/inputDriver/evdevDriver.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index 11c5cb43..27f65999 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -347,8 +347,9 @@ class driver(inputDriver): self.gDevices[fd] = True self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO) except IOError: - self.gDevices[fd] = True - #self.removeDevice(fd) + return False + # self.gDevices[fd] = True + # #self.removeDevice(fd) except Exception as e: self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: grabing not possible: ' + str(e),debug.debugLevel.ERROR) return False @@ -361,8 +362,9 @@ class driver(inputDriver): self.gDevices[fd] = False self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: ungrab device ('+ str(self.iDevices[fd].name) + ')',debug.debugLevel.INFO) except IOError: - self.gDevices[fd] = False - #self.removeDevice(fd) + return False + # self.gDevices[fd] = False + # #self.removeDevice(fd) except Exception as e: return False return True