[O] Handle null case for token

This commit is contained in:
Hykilpikonna
2020-12-01 11:19:42 -05:00
parent 7a03a182d2
commit cf712e55e6
3 changed files with 9 additions and 3 deletions
+6 -1
View File
@@ -1,5 +1,10 @@
import os
import sys
token = os.getenv('TG_TOKEN', None)
if token is None:
print('Please configure your token in environment variable TG_TOKEN first.')
sys.exit(0)
token = os.environ['TG_TOKEN']
font = os.getenv('FONT', None)
dbPath = 'database.json'