diff options
author | 2015-05-16 20:38:26 -0400 | |
---|---|---|
committer | 2015-06-19 15:51:01 -0400 | |
commit | fe9d834d80fe9c7de334619f4b37469d769558d6 (patch) | |
tree | 29d194ae78e3c8d8e96d05b6695373b6223b801a | |
parent | {config, db}.py: Adds proper support for list-installs command (diff) | |
download | webapp-config-fe9d834d80fe9c7de334619f4b37469d769558d6.tar.gz webapp-config-fe9d834d80fe9c7de334619f4b37469d769558d6.tar.bz2 webapp-config-fe9d834d80fe9c7de334619f4b37469d769558d6.zip |
config.py: Removes unnecessary .keys() call for option_to_config dict
-rw-r--r-- | WebappConfig/config.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/WebappConfig/config.py b/WebappConfig/config.py index 2c14baa..06dfc4c 100644 --- a/WebappConfig/config.py +++ b/WebappConfig/config.py @@ -904,15 +904,15 @@ class Config: 'verbose' : 'g_verbose', 'bug_report' : 'g_bugreport'} - for i in list(option_to_config.keys()): - if i in options and options[i]: + for key in option_to_config: + if key in options and options[key]: # If it's a list, we're expecting only one value in the list. - if isinstance(options[i], list): - self.config.set('USER', option_to_config[i], - str(options[i][0])) + if isinstance(options[key], list): + self.config.set('USER', option_to_config[key], + str(options[key][0])) else: - self.config.set('USER', option_to_config[i], - str(options[i])) + self.config.set('USER', option_to_config[key], + str(options[key])) # handle verbosity if ('pretend' in options |