3 ms·
Just use if not API_KEY: sys.exit("Missing YOUTUBE_API_KEY.") It will print message to sys.stderr and do system exit with code 1. P.S. exit() is just a
by Perepiska 1y ago
Just use
if not API_KEY:
sys.exit("Missing YOUTUBE_API_KEY.")
It will print message to sys.stderr and do system exit with code 1.
P.S. exit() is just an alias to sys.exit(), I prefer longer form.