mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 00:06:36 +00:00
fix: compatible configparser get
This commit is contained in:
parent
115d88faf3
commit
312a92d0ca
@ -95,7 +95,11 @@ def update_supervisord_config(user=None, yes=False):
|
|||||||
supervisord_conf_changes += '\n' + action
|
supervisord_conf_changes += '\n' + action
|
||||||
|
|
||||||
for key, value in updated_values.items():
|
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:
|
if current_value.strip() != value:
|
||||||
config.set(section, key, value)
|
config.set(section, key, value)
|
||||||
action = "Updated supervisord.conf: '{0}' changed from '{1}' to '{2}'".format(key, current_value, value)
|
action = "Updated supervisord.conf: '{0}' changed from '{1}' to '{2}'".format(key, current_value, value)
|
||||||
|
Loading…
Reference in New Issue
Block a user