From 5ccb10d6cc4fdbf2409d2c591620371c2b0afa9e Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 5 May 2017 23:39:17 +0200 Subject: [PATCH] fix search for settings.conf --- src/fenrir/core/fenrirManager.py | 1 + src/fenrir/core/generalInformation.py | 1 + src/fenrir/core/settingsManager.py | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fenrir/core/fenrirManager.py b/src/fenrir/core/fenrirManager.py index cc230849..a21931f0 100644 --- a/src/fenrir/core/fenrirManager.py +++ b/src/fenrir/core/fenrirManager.py @@ -19,6 +19,7 @@ class fenrirManager(): def __init__(self): self.initialized = False cliArgs = self.handleArgs() + print(cliArgs) if not cliArgs: return try: diff --git a/src/fenrir/core/generalInformation.py b/src/fenrir/core/generalInformation.py index ef8d11ac..7086a39d 100644 --- a/src/fenrir/core/generalInformation.py +++ b/src/fenrir/core/generalInformation.py @@ -8,6 +8,7 @@ from core import debug generalInformation = { 'running': True, +'args': None, 'tutorialMode': False, 'currUser':'', 'prevUser':'', diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index e0320cf8..117763b8 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -219,8 +219,8 @@ class settingsManager(): return None # get settings file if not os.path.exists(settingsFile): - if os.path.exists(settingsRoot + '/settings/' + settingsFile): - settingsFile = settingsRoot + '/settings/' + settingsFile + if os.path.exists(settingsRoot + '/settings/settings.conf'): + settingsFile = settingsRoot + '/settings/settings.conf' else: return None # get sound themes root @@ -234,7 +234,7 @@ class settingsManager(): validConfig = environment['runtime']['settingsManager'].loadSettings(settingsFile) if not validConfig: return None - + #print(cliArgs.options) self.setFenrirKeys(self.getSetting('general','fenrirKeys')) self.setScriptKeys(self.getSetting('general','scriptKeys'))