From 3e99fbc46b04f5493684884dae98b94c56c1d4bf Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 16 Mar 2020 13:16:43 +0530 Subject: [PATCH] fix: add section in conf if doesnt exist --- bench/config/supervisor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bench/config/supervisor.py b/bench/config/supervisor.py index 8b043daf..d97f3559 100644 --- a/bench/config/supervisor.py +++ b/bench/config/supervisor.py @@ -74,6 +74,10 @@ def update_supervisord_conf(user): config = configparser.ConfigParser() config.read(supervisord_conf) + + if section not in config.sections(): + config.add_section(section) + config[section]["chmod"] = "0760" config[section]["chown"] = "{user}:{user}".format(user=user)