From 9c55f90a4dfbcab2ae402eb1515bd9721a47166c Mon Sep 17 00:00:00 2001 From: Hristo Date: Mon, 29 Jan 2024 18:18:09 +0200 Subject: [PATCH] fix path related bug in the update script --- src/update.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/update.py b/src/update.py index 1991750..13a1432 100644 --- a/src/update.py +++ b/src/update.py @@ -39,11 +39,11 @@ def display_config_differences(current_config, example_config, display=True): else: return False -def update_config_version(version): - with open('config.py', 'r') as f: +def update_config_version(version, script_dir): + with open(script_dir + '/config.py', 'r') as f: lines = f.readlines() - with open('config.py', 'w') as f: + with open(script_dir + '/config.py', 'w') as f: print(":: Updating config version to {}".format(version)) for line in lines: if 'version = ' in line: @@ -65,7 +65,7 @@ def do_update(version=config.version, git_update=True, config_update=True): update_config(script_dir + 'config.py',script_dir + 'config.py.example') if version != config.version: - update_config_version(version) + update_config_version(version, script_dir) if __name__ == '__main__':