Skip to content

Commit

Permalink
Merge pull request #114 from hugorosario/main
Browse files Browse the repository at this point in the history
Retry connection without plain text authentication
  • Loading branch information
akpw authored Mar 25, 2024
2 parents 0fe5417 + d1a7fce commit 6287fe5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mktxp/flow/router_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ def connect(self):
return
try:
print(f'Connecting to router {self.router_name}@{self.config_entry.hostname}')
self.api = self.connection.get_api()
try:
self.api = self.connection.get_api()
except:
self.connection.plaintext_login = False
self.api = self.connection.get_api()

self._set_connect_state(success = True, connect_time = connect_time)
except (socket.error, socket.timeout, Exception) as exc:
self._set_connect_state(success = False, connect_time = connect_time, exc = exc)
Expand Down

0 comments on commit 6287fe5

Please sign in to comment.