Skip to content

Commit

Permalink
Merge pull request #5 from paulianttila/dev
Browse files Browse the repository at this point in the history
Improved mfa error situation
  • Loading branch information
paulianttila authored Jun 13, 2023
2 parents 29eb5b2 + 2a6aebf commit 5a6f6e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def init(self, callbacks: Callbacks) -> None:
self.giid = None

def get_version(self) -> str:
return "2.0.1"
return "2.0.2"

def stop(self) -> None:
self.logger.debug("Exit")
Expand Down Expand Up @@ -126,7 +126,10 @@ def login(self) -> None:
self.installations = self.verisure.login_cookie()
self.handle_succesfull_login()
except VerisureLoginError as e:
self.handle_mfa_required_error(e)
if "Multifactor authentication enabled" in str(e):
self.handle_mfa_required_error(e)
else:
self.handle_failed_login(e)
raise
else:
self.handle_failed_login(e)
Expand Down

0 comments on commit 5a6f6e2

Please sign in to comment.