mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-27 19:28:54 +02:00
added ssl_handshake_failure error for UI
This commit is contained in:
parent
81aa8d0bd5
commit
e2c81c950f
3 changed files with 7 additions and 1 deletions
|
@ -75,7 +75,8 @@ class MikrotikAPI:
|
|||
librouteros.exceptions.MultiTrapError,
|
||||
librouteros.exceptions.ConnectionClosed,
|
||||
librouteros.exceptions.ProtocolError,
|
||||
librouteros.exceptions.FatalError
|
||||
librouteros.exceptions.FatalError,
|
||||
ssl.SSLError
|
||||
) as api_error:
|
||||
_LOGGER.error("Mikrotik %s: %s", self._host, api_error)
|
||||
self.error_to_strings("%s" % api_error)
|
||||
|
@ -95,6 +96,9 @@ class MikrotikAPI:
|
|||
self.error = "cannot_connect"
|
||||
if error == "invalid user name or password (6)":
|
||||
self.error = "wrong_login"
|
||||
|
||||
if "ALERT_HANDSHAKE_FAILURE" in error:
|
||||
self.error = "ssl_handshake_failure"
|
||||
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue