mirror of
https://github.com/Dasemu/Transcriptarr.git
synced 2026-11-27 23:46:08 +00:00
Switched to os.environ.get to prevent keyerror on empty env variable
This commit is contained in:
1 parent
0a6c64445b
commit
dde860f0b5
1 file changed
+5
-5
+5
-5
@@ -131,11 +131,11 @@ def main():
|
|||||||
print(f"Running launcher-{branch_name}.py for the '{branch_name}' branch.")
|
print(f"Running launcher-{branch_name}.py for the '{branch_name}' branch.")
|
||||||
os.execl(sys.executable, sys.executable, f"launcher{script_name}", *new_args)
|
os.execl(sys.executable, sys.executable, f"launcher{script_name}", *new_args)
|
||||||
|
|
||||||
# Set environment variables based on the parsed arguments
|
# Set environment variables based on the parsed arguments
|
||||||
if convert_to_bool(os.environ['DEBUG']) not True:
|
if not convert_to_bool(os.environ.get('DEBUG', '')):
|
||||||
os.environ['DEBUG'] = str(args.debug)
|
os.environ['DEBUG'] = str(args.debug)
|
||||||
if convert_to_bool(os.environ['APPEND']) not True:
|
if not convert_to_bool(os.environ.get('APPEND', '')):
|
||||||
os.environ['DEBUG'] = str(args.append)
|
os.environ['APPEND'] = str(args.append)
|
||||||
|
|
||||||
if args.setup_bazarr:
|
if args.setup_bazarr:
|
||||||
prompt_and_save_bazarr_env_variables()
|
prompt_and_save_bazarr_env_variables()
|
||||||
|
|||||||
Reference in new issue
Block a user