add minimal error check on config
This commit is contained in:
parent
1249c8347a
commit
dff2cbbc7c
1 changed files with 5 additions and 0 deletions
|
@ -397,6 +397,11 @@ def main():
|
||||||
Base.query = db_session.query_property()
|
Base.query = db_session.query_property()
|
||||||
Base.metadata.create_all(bind=engine)
|
Base.metadata.create_all(bind=engine)
|
||||||
|
|
||||||
|
if len(config['ACCESS_TOKEN']) <= 1:
|
||||||
|
logger.error("Error, invalid access token")
|
||||||
|
logger.error(f"You may not have updated " + filename)
|
||||||
|
exit(-1)
|
||||||
|
|
||||||
pnutpy.api.add_authorization_token(config['ACCESS_TOKEN'])
|
pnutpy.api.add_authorization_token(config['ACCESS_TOKEN'])
|
||||||
|
|
||||||
ws_url = "wss://stream.pnut.io/v1/user"
|
ws_url = "wss://stream.pnut.io/v1/user"
|
||||||
|
|
Loading…
Reference in a new issue