mirror of
https://github.com/Dielee/volvo2mqtt.git
synced 2026-07-22 02:13:01 +02:00
handle missing refresh_token key in token file (#306)
This commit is contained in:
@@ -48,6 +48,10 @@ def authorize(renew_tokenfile=False):
|
||||
logging.warning("Detected corrupted token file, restarting auth process")
|
||||
authorize(True)
|
||||
return
|
||||
except KeyError:
|
||||
logging.warning("Token file missing refresh_token, restarting auth process")
|
||||
authorize(True)
|
||||
return
|
||||
else:
|
||||
logging.info("Starting login with OTP")
|
||||
auth_session = requests.session()
|
||||
|
||||
Reference in New Issue
Block a user