Add default values for environment variables

This should reduce errors by some values not being set in the .env file - namely 2FA and Theme
This commit is contained in:
Callum Leslie committed 2022-06-04 00:31:56 +01:00
1 parent db1ddce57a
commit ccd0c60d87
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ reddit_object = get_subreddit_threads()
load_dotenv()
length, number_of_comments = save_text_to_mp3(reddit_object)
download_screenshots_of_reddit_posts(reddit_object, number_of_comments, os.getenv("THEME"))
download_screenshots_of_reddit_posts(reddit_object, number_of_comments, os.getenv("THEME", "light"))
download_background()
chop_background_video(length)
final_video = make_final_video(number_of_comments)
+1 -1
View File
@@ -15,7 +15,7 @@ def get_subreddit_threads():
print_step("Getting AskReddit threads...")
if os.getenv("REDDIT_2FA").lower() == "yes":
if os.getenv("REDDIT_2FA", default="no").lower() == "yes":
print(
"\nEnter your two-factor authentication code from your authenticator app.\n"
)