Skip to content

Commit

Permalink
fix: compatible configparser get
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed Jul 13, 2020
1 parent 115d88f commit 312a92d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bench/config/supervisor.py
Expand Up @@ -95,7 +95,11 @@ def update_supervisord_config(user=None, yes=False):
supervisord_conf_changes += '\n' + action

for key, value in updated_values.items():
current_value = config[section].get(key, "")
try:
current_value = config.get(section, key)
except configparser.NoOptionError:
current_value = ""

if current_value.strip() != value:
config.set(section, key, value)
action = "Updated supervisord.conf: '{0}' changed from '{1}' to '{2}'".format(key, current_value, value)
Expand Down

0 comments on commit 312a92d

Please sign in to comment.