From 24e63939fa59f97c792cfb7ff5602261dcaec92b Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Wed, 3 Jul 2024 19:50:58 +0300 Subject: [PATCH] BB_plush_watch_temp_files.py: change the key name and extract it --- python-programming/BB_plus_watch_temp_files.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python-programming/BB_plus_watch_temp_files.py b/python-programming/BB_plus_watch_temp_files.py index fa736d7..eef47d0 100644 --- a/python-programming/BB_plus_watch_temp_files.py +++ b/python-programming/BB_plus_watch_temp_files.py @@ -20,7 +20,8 @@ from sys import exit if exists(".env"): load_dotenv() -EXEC_PATH = environ.get("BBIEAL_EXECUTABLE_PATH", None) +EXEC_KEY = "BALDI_PLUS_EXECUTABLE_PATH" +EXEC_PATH = environ.get(EXEC_KEY, None) PATH_TO_WATCH = path_join(gettempdir(), "Basically Games", "Baldi's Basics Plus") @@ -32,10 +33,10 @@ def respectful_makedirs(path: str) -> None: if __name__ == "__main__": if EXEC_PATH is None: - print("Please create a .env file in the current directory with key " - "BBIEAL_EXECUTABLE_PATH, containing path to the executable of " - "your copy of the video game Baldi's Basics Plus, or set such an " - "environmental variable.") + print( "Please create a .env file in the current directory with key " + f"{EXEC_KEY}, containing path to the executable of your copy of " + "the video game Baldi's Basics Plus, or set such an " + "environmental variable.") exit(1) print("Path to watch:", PATH_TO_WATCH)