fallback to dummy if possible
This commit is contained in:
parent
5da7be72e2
commit
a636d8020e
@ -141,11 +141,15 @@ class settingsManager():
|
|||||||
self.env['runtime'][driverType].initialize(self.env)
|
self.env['runtime'][driverType].initialize(self.env)
|
||||||
self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") OK",debug.debugLevel.INFO, onAnyLevel=True)
|
self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") OK",debug.debugLevel.INFO, onAnyLevel=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
driver_mod = module_utils.importModule(driverName,
|
self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") FAILED:"+ str(e), debug.debugLevel.ERROR)
|
||||||
fenrirPath + "/" + driverType + '/dummyDriver.py')
|
try:
|
||||||
self.env['runtime'][driverType] = driver_mod.driver()
|
driver_mod = module_utils.importModule(driverName,
|
||||||
self.env['runtime'][driverType].initialize(self.env)
|
fenrirPath + "/" + driverType + '/dummyDriver.py')
|
||||||
self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") FAILED:"+ str(e), debug.debugLevel.ERROR)
|
self.env['runtime'][driverType] = driver_mod.driver()
|
||||||
|
self.env['runtime'][driverType].initialize(self.env)
|
||||||
|
except Exception as e:
|
||||||
|
self.env['runtime']['debug'].writeDebugOut('(fallback) Loading Driver ' + driverType + ' (dummyDriver) FAILED:'+ str(e), debug.debugLevel.ERROR)
|
||||||
|
|
||||||
def shutdownDriver(self, driverType):
|
def shutdownDriver(self, driverType):
|
||||||
if self.env['runtime'][driverType] == None:
|
if self.env['runtime'][driverType] == None:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user