From c1cf90bda3aebbfeadfd5f1e4a6e3c24abd0dd10 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 2 Apr 2021 19:33:13 +0100 Subject: [PATCH] Add comment about using .parent because non-main script is in library.zip --- config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/config.py b/config.py index b193dda6..ffa651d4 100644 --- a/config.py +++ b/config.py @@ -134,6 +134,7 @@ def appversion() -> semantic_version.Version: """ if getattr(sys, 'frozen', False): # Running frozen, so we should have a .gitversion file + # Yes, .parent because if frozen we're inside library.zip with open(pathlib.Path(sys.path[0]).parent / GITVERSION_FILE, 'r', encoding='utf-8') as gitv: shorthash = gitv.read()