From 50187c5aeba5246cd4ea552eb6111ec95f4db3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Thu, 18 Nov 2021 22:24:45 +0100 Subject: [PATCH] Added --config-location argument --- zspotify/config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zspotify/config.py b/zspotify/config.py index f6e5ae97..75b437ed 100644 --- a/zspotify/config.py +++ b/zspotify/config.py @@ -42,7 +42,12 @@ class Config: @classmethod def load(cls, args) -> None: app_dir = os.path.dirname(__file__) - true_config_file_path = os.path.join(app_dir, CONFIG_FILE_PATH) + + config_fp = CONFIG_FILE_PATH + if args.config_location: + config_fp = args.config_location + + true_config_file_path = os.path.join(app_dir, config_fp) if not os.path.exists(true_config_file_path): with open(true_config_file_path, 'w', encoding='utf-8') as config_file: