From a79f8436ef3fde6ddddbcb28ba10eb0e0204f47a Mon Sep 17 00:00:00 2001 From: Erilea Date: Fri, 22 Mar 2024 20:05:29 +0100 Subject: [PATCH] Import gclib relative to __file__ instead of cwd Fixes executing the randomizer from a different working directory than the root of the repository --- wwrando.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wwrando.py b/wwrando.py index 07486c32..c9ddfdab 100644 --- a/wwrando.py +++ b/wwrando.py @@ -1,7 +1,8 @@ #!/usr/bin/python3 import sys -sys.path.insert(0, "./gclib") +import os.path +sys.path.insert(0, os.path.join(os.path.dirname(__file__), "gclib")) # Allow keyboard interrupts on the command line to instantly close the program. import signal