This commit is contained in:
chrys 2018-09-11 02:53:05 +02:00
parent 8c8707167b
commit 93bf3fb1df

View File

@ -154,8 +154,10 @@ class settingsManager():
def loadDriver(self, driverName, driverType):
try:
if self.env['runtime'][driverType] != None:
self.env['runtime'][driverType].shutdown(self.env)
except:
pass
try:
driver_mod = module_utils.importModule(driverName,
fenrirPath + "/" + driverType + '/' + driverName + '.py')
self.env['runtime'][driverType] = driver_mod.driver()
@ -172,8 +174,6 @@ class settingsManager():
self.env['runtime']['debug'].writeDebugOut('(fallback) Loading Driver ' + driverType + ' (dummyDriver) FAILED:'+ str(e), debug.debugLevel.ERROR)
def shutdownDriver(self, driverType):
if self.env['runtime'][driverType] == None:
return
try:
self.env['runtime'][driverType].shutdown()
except Exception as e: