From d22bed033f8e48fc78a1a6cbd5a762c786f75ea1 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 28 Mar 2018 17:08:07 +0200 Subject: [PATCH] fallback to dummy if possible --- src/fenrirscreenreader/core/settingsManager.py | 5 ++++- src/fenrirscreenreader/inputDriver/evdevDriver.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fenrirscreenreader/core/settingsManager.py b/src/fenrirscreenreader/core/settingsManager.py index a2180b3e..446046e5 100644 --- a/src/fenrirscreenreader/core/settingsManager.py +++ b/src/fenrirscreenreader/core/settingsManager.py @@ -141,7 +141,10 @@ class settingsManager(): self.env['runtime'][driverType].initialize(self.env) self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") OK",debug.debugLevel.INFO, onAnyLevel=True) except Exception as e: - self.env['runtime'][driverType] = None + driver_mod = module_utils.importModule(driverName, + fenrirPath + "/" + driverType + '/dummyDriver.py') + self.env['runtime'][driverType] = driver_mod.driver() + self.env['runtime'][driverType].initialize(self.env) self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") FAILED:"+ str(e), debug.debugLevel.ERROR) def shutdownDriver(self, driverType): if self.env['runtime'][driverType] == None: diff --git a/src/fenrirscreenreader/inputDriver/evdevDriver.py b/src/fenrirscreenreader/inputDriver/evdevDriver.py index 99a972dc..7f6e34a8 100644 --- a/src/fenrirscreenreader/inputDriver/evdevDriver.py +++ b/src/fenrirscreenreader/inputDriver/evdevDriver.py @@ -32,7 +32,7 @@ from fenrirscreenreader.core.eventData import fenrirEventType from fenrirscreenreader.core import inputData from fenrirscreenreader.core import debug from fenrirscreenreader.core.inputDriver import inputDriver - +asdasd class driver(inputDriver): def __init__(self): inputDriver.__init__(self)