From f16a367986873c759271d1137da31bf61f505e65 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 2 Apr 2021 19:19:45 +0100 Subject: [PATCH] Use full path to open .gitversion out of paranoia. --- config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config.py b/config.py index 159a29b3..b193dda6 100644 --- a/config.py +++ b/config.py @@ -134,11 +134,9 @@ def appversion() -> semantic_version.Version: """ if getattr(sys, 'frozen', False): # Running frozen, so we should have a .gitversion file - with open(GITVERSION_FILE, 'r', encoding='utf-8') as gitv: + with open(pathlib.Path(sys.path[0]).parent / GITVERSION_FILE, 'r', encoding='utf-8') as gitv: shorthash = gitv.read() - # TODO: Check if there was already a build meta data in static_appversion ? - else: # Running from source shorthash = git_shorthash_from_head()