Update settingsManager.py

This commit is contained in:
chrys87 2016-10-05 11:17:51 +02:00 committed by GitHub
parent 491b981f03
commit a10fa156ef

View File

@ -26,7 +26,7 @@ class settingsManager():
self.env = environment self.env = environment
def shutdown(self): def shutdown(self):
pass pass
def loadShortcuts(self, kbConfigPath='../../config/keyboard/desktop.conf'): def loadShortcuts(self, kbConfigPath=os.path.dirname(os.path.realpath(__main__.__file__)) + '/../../config/keyboard/desktop.conf'):
kbConfig = open(kbConfigPath,"r") kbConfig = open(kbConfigPath,"r")
while(True): while(True):
line = kbConfig.readline() line = kbConfig.readline()
@ -159,8 +159,8 @@ class settingsManager():
environment['runtime']['debug'] = debug.debug() environment['runtime']['debug'] = debug.debug()
environment['runtime']['debug'].initialize(environment) environment['runtime']['debug'].initialize(environment)
if not os.path.exists(settingsRoot): if not os.path.exists(settingsRoot):
if os.path.exists('../../config/'): if os.path.exists(os.path.dirname(os.path.realpath(__main__.__file__)) +'/../../config/'):
settingsRoot = '../../config/' settingsRoot = os.path.dirname(os.path.realpath(__main__.__file__)) +'/../../config/'
else: else:
return None return None