I did a dumb

This commit is contained in:
Sijmen 2017-11-11 01:23:43 +01:00
parent 871c3cc184
commit 8e65fe672f

7
app.py
View file

@ -25,8 +25,11 @@ class Database:
f = open('database.json', 'r') f = open('database.json', 'r')
except OSError: except OSError:
print('database does not exist, generating from config') print('database does not exist, generating from config')
else: Database.user_tokens = USER_TOKENS
database = json.load(f) Database.group_ids = VIA_GROUPS
return
database = json.load(f)
Database.user_tokens = database.get('user_tokens') or USER_TOKENS Database.user_tokens = database.get('user_tokens') or USER_TOKENS
Database.group_ids = database.get('group_ids') or VIA_GROUPS Database.group_ids = database.get('group_ids') or VIA_GROUPS