diff --git a/utils.py b/utils.py index 6f9faebc81705a5e326c3aed7b242a6ef2f32108..b7be31b8ad51178ed72996ec1e68e7d2200d11de 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()