I did a dumb
This commit is contained in:
parent
871c3cc184
commit
8e65fe672f
1 changed files with 5 additions and 2 deletions
7
app.py
7
app.py
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue