From 584f20c92522094739cb10c6255c7f94914c1864 Mon Sep 17 00:00:00 2001 From: Nicolas KAROLAK <nicolas@karolak.fr> Date: Tue, 29 Jan 2019 17:34:49 +0100 Subject: [PATCH] fix path and file opening | refs #27883 --- utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 6f9faebc..b7be31b8 100644 --- a/utils.py +++ b/utils.py @@ -227,7 +227,8 @@ def set_conf(key: str, value: str, override: bool = False) -> bool: state = False # open conf.sh file - conf_fh = open(Path(__file__, CONF_PATH).resolve(), "w") + base_dir = Path(__file__).resolve().parent + conf_fh = open(Path(base_dir, CONF_PATH).resolve(), "w+") # get its content conf = conf_fh.read() -- GitLab