Add Config.get_dict()

We don't want the version from DefaultSettings, so use super() to get
the standard functionality from conf.Settings.
This commit is contained in:
Alex Liebowitz 2016-12-01 09:07:48 -05:00
parent 205a10bc8e
commit 876cdce51f

View file

@ -270,6 +270,9 @@ class Config(DefaultSettings):
def UI_ADDRESS(self): def UI_ADDRESS(self):
return "http://%s:%i" % (DEFAULT_SETTINGS.API_INTERFACE, self.api_port) return "http://%s:%i" % (DEFAULT_SETTINGS.API_INTERFACE, self.api_port)
def get_dict(self):
return {k: self[k] for k in self}
def get_adjustable_settings_dict(self): def get_adjustable_settings_dict(self):
return {opt: val for opt, val in self.get_dict().iteritems() if opt in ENVIRONMENT.original_schema} return {opt: val for opt, val in self.get_dict().iteritems() if opt in ENVIRONMENT.original_schema}