From 37a7e22154a4161dfe060614f5b18ad10f9e8bdd Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 30 Jan 2019 09:28:04 +0100 Subject: [PATCH] Update evdevDriver.py --- src/fenrirscreenreader/inputDriver/evdevDriver.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index 76338a62..a68a60a5 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -52,15 +52,14 @@ class driver(inputDriver): if not self._initialized: global _evdevAvailableError global _udevAvailableError - currError = ' ' - if not _evdevAvailable: - currError += _evdevAvailableError if not _udevAvailable: - currError += ' ' + _udevAvailableError - self.env['runtime']['debug'].writeDebugOut('InputDriver:' + currError, debug.debugLevel.ERROR) - return + self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _udevAvailableError, debug.debugLevel.ERROR) + if not _evdevAvailable: + self.env['runtime']['debug'].writeDebugOut('InputDriver:' + _evdevAvailableError, debug.debugLevel.ERROR) + return - self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev) + if _udevAvailable: + self.env['runtime']['processManager'].addCustomEventThread(self.plugInputDeviceWatchdogUdev) self.env['runtime']['processManager'].addCustomEventThread(self.inputWatchdog) def plugInputDeviceWatchdogUdev(self,active , eventQueue): context = pyudev.Context()