Add default values for environment variables

This should reduce errors by some values not being set in the .env file - namely 2FA and Theme
pull/241/head
Callum Leslie 3 years ago
parent db1ddce57a
commit ccd0c60d87

@ -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)

@ -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"
)

Loading…
Cancel
Save