fix -o for camel case options

This commit is contained in:
chrys 2017-06-26 01:41:19 +02:00
parent 34b74c72d4
commit 449f149f97
2 changed files with 9 additions and 8 deletions

View File

@ -63,8 +63,8 @@ class fenrirManager():
self.environment['runtime']['inputManager'].clearEventBuffer()
if self.environment['input']['keyForeward'] > 0:
self.environment['input']['keyForeward'] -=1
self.environment['runtime']['screenManager'].update('onInput')
self.environment['runtime']['commandManager'].executeDefaultTrigger('onInput')
#self.environment['runtime']['screenManager'].update('onInput')
#self.environment['runtime']['commandManager'].executeDefaultTrigger('onInput')
self.handleCommands()
def handleScreenChange(self):
self.environment['runtime']['screenManager'].update('onScreenChange')

View File

@ -147,7 +147,7 @@ class settingsManager():
def getSetting(self, section, setting):
value = ''
try:
value = self.settingArgDict[section][setting]
value = self.settingArgDict[section.lower()][setting.lower()]
return value
except:
pass
@ -160,9 +160,9 @@ class settingsManager():
def getSettingAsInt(self, section, setting):
value = 0
try:
value = int(self.settingArgDict[section][setting])
value = int(self.settingArgDict[section.lower()][setting.lower()])
return value
except:
except Exception as e:
pass
try:
value = self.env['settings'].getint(section, setting)
@ -173,7 +173,7 @@ class settingsManager():
def getSettingAsFloat(self, section, setting):
value = 0.0
try:
value = float(self.settingArgDict[section][setting])
value = float(self.settingArgDict[section.lower()][setting.lower()])
return value
except Exception as e:
pass
@ -186,7 +186,7 @@ class settingsManager():
def getSettingAsBool(self, section, setting):
value = False
try:
value = self.settingArgDict[section][setting].upper() in ['1','YES','JA','TRUE']
value = self.settingArgDict[section.lower()][setting.lower()].upper() in ['1','YES','JA','TRUE']
return value
except Exception as e:
pass
@ -241,6 +241,7 @@ class settingsManager():
except KeyError:
optionArgDict[section] = {}
optionArgDict[section][option] = str(value)
print(optionArgDict)
return optionArgDict
def initFenrirConfig(self, cliArgs, fenrirManager = None, environment = environment.environment):
settingsRoot = '/etc/fenrir/'