mirror of
https://github.com/KevinMidboe/mktxp-no-cli.git
synced 2025-10-29 17:50:23 +00:00
Retry connection without plain text authentication
This commit is contained in:
@@ -78,7 +78,12 @@ class RouterAPIConnection:
|
|||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
print(f'Connecting to router {self.router_name}@{self.config_entry.hostname}')
|
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)
|
self._set_connect_state(success = True, connect_time = connect_time)
|
||||||
except (socket.error, socket.timeout, Exception) as exc:
|
except (socket.error, socket.timeout, Exception) as exc:
|
||||||
self._set_connect_state(success = False, connect_time = connect_time, exc = exc)
|
self._set_connect_state(success = False, connect_time = connect_time, exc = exc)
|
||||||
|
|||||||
Reference in New Issue
Block a user