From 8f537532532266baad6028407db7e35eff675254 Mon Sep 17 00:00:00 2001 From: Kryomaani <53344902+Kryomancer@users.noreply.github.com> Date: Mon, 11 Dec 2023 17:49:12 +0200 Subject: [PATCH] don't throw on empty strings --- modules/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/main.py b/modules/main.py index 43c33f6..9b04478 100644 --- a/modules/main.py +++ b/modules/main.py @@ -7,7 +7,7 @@ from tqdm import tqdm # upon import, in which case if they are unset the script will crash before we can output these messages. envMissing = False for env in ['api','key','organization','model','language','timeout','fileThreads','threads','width','listWidth']: - if os.getenv(env) is None or str(os.getenv(env))[0] == '<': + if os.getenv(env) is None or str(os.getenv(env))[:1] == '<': tqdm.write(Fore.RED + f'Environment variable {env} is not set!') envMissing = True if envMissing: