From 491b981f03af464da671698821e70c987a3f6840 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Wed, 5 Oct 2016 11:14:01 +0200 Subject: [PATCH] Update settingsManager.py --- src/fenrir/core/settingsManager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index 1d404aef..4d931a2f 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -6,6 +6,7 @@ import importlib.util import os +import __main__ from configparser import ConfigParser from core import inputManager from core import outputManager @@ -128,7 +129,7 @@ class settingsManager(): if self.env['runtime'][driverType] != None: print('shutdown %s',driverType) self.env['runtime'][driverType].shutdown(self.env) - spec = importlib.util.spec_from_file_location(driverName, driverType + '/' + driverName + '.py') + spec = importlib.util.spec_from_file_location(driverName, os.path.dirname(os.path.realpath(__main__.__file__)) + "/" + driverType + '/' + driverName + '.py') driver_mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(driver_mod) self.env['runtime'][driverType] = driver_mod.driver()