Skip to content

Commit

Permalink
Retry connection without plain text authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoRosarioZS committed Feb 21, 2024
1 parent 10e6802 commit 28dae30
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 28dae30

Please sign in to comment.