2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

fix: add section in conf if doesnt exist

This commit is contained in:
Gavin D'souza 2020-03-16 13:16:43 +05:30
parent 78dbdcb3f1
commit 3e99fbc46b

View File

@ -74,6 +74,10 @@ def update_supervisord_conf(user):
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read(supervisord_conf) config.read(supervisord_conf)
if section not in config.sections():
config.add_section(section)
config[section]["chmod"] = "0760" config[section]["chmod"] = "0760"
config[section]["chown"] = "{user}:{user}".format(user=user) config[section]["chown"] = "{user}:{user}".format(user=user)