fallback to dummy if possible

This commit is contained in:
chrys 2018-03-28 17:08:07 +02:00
parent bf77cbc660
commit d22bed033f
2 changed files with 5 additions and 2 deletions

View File

@ -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:

View File

@ -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)