2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-24 04:59:01 +00:00

fix: compatible configparser get

This commit is contained in:
Gavin D'souza 2020-07-13 18:36:21 +05:30
parent 115d88faf3
commit 312a92d0ca

View File

@ -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)