From ec588522b0055d0293630213620d5c7885690817 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Tue, 25 Jul 2017 14:55:28 +0200 Subject: [PATCH] Update settingsManager.py --- src/fenrir/core/settingsManager.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index 5c6f5b0f..c7c4e183 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -108,7 +108,7 @@ class settingsManager(): def isValidKey(self, key): return key in inputData.keyNames - def loadDicts(self, dictConfigPath=os.path.dirname(os.path.realpath(fenrirVersion.__file__)) + '/../../config/punctuation/default.conf'): + def loadDicts(self, dictConfigPath=fenrirPath + '/../../config/punctuation/default.conf'): dictConfig = open(dictConfigPath,"r") currDictName = '' while(True): @@ -206,7 +206,7 @@ class settingsManager(): if self.env['runtime'][driverType] != None: self.env['runtime'][driverType].shutdown(self.env) driver_mod = module_utils.importModule(driverName, - os.path.dirname(os.path.realpath(fenrirVersion.__file__)) + "/" + driverType + '/' + driverName + '.py') + fenrirPath + "/" + driverType + '/' + driverName + '.py') self.env['runtime'][driverType] = driver_mod.driver() self.env['runtime'][driverType].initialize(self.env) self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") OK",debug.debugLevel.INFO, onAnyLevel=True) @@ -259,8 +259,8 @@ class settingsManager(): environment['runtime']['debug'].initialize(environment) # get fenrir settings root if not os.path.exists(settingsRoot): - if os.path.exists(os.path.dirname(os.path.realpath(fenrirVersion.__file__)) +'/../../config/'): - settingsRoot = os.path.dirname(os.path.realpath(fenrirVersion.__file__)) +'/../../config/' + if os.path.exists(fenrirPath) +'/../../config/'): + settingsRoot = fenrirPath +'/../../config/' else: return None # get settings file @@ -271,8 +271,8 @@ class settingsManager(): return None # get sound themes root if not os.path.exists(soundRoot): - if os.path.exists(os.path.dirname(os.path.realpath(fenrirVersion.__file__)) +'/../../config/sound/'): - soundRoot = os.path.dirname(os.path.realpath(fenrirVersion.__file__)) +'/../../config/sound/' + if os.path.exists(fenrirPath) +' /../../config/sound/'): + soundRoot = fenrirPath + '/../../config/sound/' environment['runtime']['settingsManager'] = self environment['runtime']['settingsManager'].initialize(environment)