handle missing refresh_token key in token file (#306)

This commit is contained in:
Gert-Andry Kääramees
2025-07-28 07:39:44 +02:00
committed by GitHub
parent 54db72df94
commit 33ee258f3f
+4
View File
@@ -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()