fix -o for camel case options
This commit is contained in:
parent
34b74c72d4
commit
449f149f97
@ -63,8 +63,8 @@ class fenrirManager():
|
|||||||
self.environment['runtime']['inputManager'].clearEventBuffer()
|
self.environment['runtime']['inputManager'].clearEventBuffer()
|
||||||
if self.environment['input']['keyForeward'] > 0:
|
if self.environment['input']['keyForeward'] > 0:
|
||||||
self.environment['input']['keyForeward'] -=1
|
self.environment['input']['keyForeward'] -=1
|
||||||
self.environment['runtime']['screenManager'].update('onInput')
|
#self.environment['runtime']['screenManager'].update('onInput')
|
||||||
self.environment['runtime']['commandManager'].executeDefaultTrigger('onInput')
|
#self.environment['runtime']['commandManager'].executeDefaultTrigger('onInput')
|
||||||
self.handleCommands()
|
self.handleCommands()
|
||||||
def handleScreenChange(self):
|
def handleScreenChange(self):
|
||||||
self.environment['runtime']['screenManager'].update('onScreenChange')
|
self.environment['runtime']['screenManager'].update('onScreenChange')
|
||||||
|
@ -147,7 +147,7 @@ class settingsManager():
|
|||||||
def getSetting(self, section, setting):
|
def getSetting(self, section, setting):
|
||||||
value = ''
|
value = ''
|
||||||
try:
|
try:
|
||||||
value = self.settingArgDict[section][setting]
|
value = self.settingArgDict[section.lower()][setting.lower()]
|
||||||
return value
|
return value
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@ -160,9 +160,9 @@ class settingsManager():
|
|||||||
def getSettingAsInt(self, section, setting):
|
def getSettingAsInt(self, section, setting):
|
||||||
value = 0
|
value = 0
|
||||||
try:
|
try:
|
||||||
value = int(self.settingArgDict[section][setting])
|
value = int(self.settingArgDict[section.lower()][setting.lower()])
|
||||||
return value
|
return value
|
||||||
except:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
value = self.env['settings'].getint(section, setting)
|
value = self.env['settings'].getint(section, setting)
|
||||||
@ -173,7 +173,7 @@ class settingsManager():
|
|||||||
def getSettingAsFloat(self, section, setting):
|
def getSettingAsFloat(self, section, setting):
|
||||||
value = 0.0
|
value = 0.0
|
||||||
try:
|
try:
|
||||||
value = float(self.settingArgDict[section][setting])
|
value = float(self.settingArgDict[section.lower()][setting.lower()])
|
||||||
return value
|
return value
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
@ -186,7 +186,7 @@ class settingsManager():
|
|||||||
def getSettingAsBool(self, section, setting):
|
def getSettingAsBool(self, section, setting):
|
||||||
value = False
|
value = False
|
||||||
try:
|
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
|
return value
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
@ -241,6 +241,7 @@ class settingsManager():
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
optionArgDict[section] = {}
|
optionArgDict[section] = {}
|
||||||
optionArgDict[section][option] = str(value)
|
optionArgDict[section][option] = str(value)
|
||||||
|
print(optionArgDict)
|
||||||
return optionArgDict
|
return optionArgDict
|
||||||
def initFenrirConfig(self, cliArgs, fenrirManager = None, environment = environment.environment):
|
def initFenrirConfig(self, cliArgs, fenrirManager = None, environment = environment.environment):
|
||||||
settingsRoot = '/etc/fenrir/'
|
settingsRoot = '/etc/fenrir/'
|
||||||
|
Loading…
Reference in New Issue
Block a user