From b32a63d9b469dca6fcd912a5318a797c4e225957 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Sun, 30 Oct 2022 16:55:18 +0100 Subject: [PATCH] fix config file variable --- controldeck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controldeck.py b/controldeck.py index 4af759f..a89157a 100755 --- a/controldeck.py +++ b/controldeck.py @@ -104,10 +104,10 @@ def config_load(conf=''): config = ConfigParser(strict=False) # fist check if file is given if conf: - config_file_path = conf + config_file = conf else: # check if config file is located at the script's location - config_file = path.dirname(path.realpath(__file__)) + sep + CONFIG_FILE_NAME # realpath; resolve symlink + config_file = path.join(path.dirname(path.realpath(__file__)), CONFIG_FILE_NAME) # realpath; resolve symlink if not path.exists(config_file): # if not, use the file inside .config makedirs(CONFIG_DIR, exist_ok=True)