mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-21 19:24:38 +02:00
added socket error and timeout exception to api
This commit is contained in:
parent
897d5dc0c4
commit
8efb4ff602
1 changed files with 15 additions and 0 deletions
|
@ -14,6 +14,7 @@ from .const import (
|
||||||
)
|
)
|
||||||
|
|
||||||
import librouteros
|
import librouteros
|
||||||
|
from socket import error as socket_error, timeout as socket_timeout
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -126,6 +127,8 @@ class MikrotikAPI:
|
||||||
librouteros.exceptions.ConnectionClosed,
|
librouteros.exceptions.ConnectionClosed,
|
||||||
librouteros.exceptions.ProtocolError,
|
librouteros.exceptions.ProtocolError,
|
||||||
librouteros.exceptions.FatalError,
|
librouteros.exceptions.FatalError,
|
||||||
|
socket_timeout,
|
||||||
|
socket_error,
|
||||||
ssl.SSLError,
|
ssl.SSLError,
|
||||||
BrokenPipeError,
|
BrokenPipeError,
|
||||||
OSError,
|
OSError,
|
||||||
|
@ -204,6 +207,8 @@ class MikrotikAPI:
|
||||||
librouteros.exceptions.MultiTrapError,
|
librouteros.exceptions.MultiTrapError,
|
||||||
librouteros.exceptions.ProtocolError,
|
librouteros.exceptions.ProtocolError,
|
||||||
librouteros.exceptions.FatalError,
|
librouteros.exceptions.FatalError,
|
||||||
|
socket_timeout,
|
||||||
|
socket_error,
|
||||||
ssl.SSLError,
|
ssl.SSLError,
|
||||||
BrokenPipeError,
|
BrokenPipeError,
|
||||||
OSError,
|
OSError,
|
||||||
|
@ -268,6 +273,8 @@ class MikrotikAPI:
|
||||||
librouteros.exceptions.MultiTrapError,
|
librouteros.exceptions.MultiTrapError,
|
||||||
librouteros.exceptions.ProtocolError,
|
librouteros.exceptions.ProtocolError,
|
||||||
librouteros.exceptions.FatalError,
|
librouteros.exceptions.FatalError,
|
||||||
|
socket_timeout,
|
||||||
|
socket_error,
|
||||||
ssl.SSLError,
|
ssl.SSLError,
|
||||||
BrokenPipeError,
|
BrokenPipeError,
|
||||||
OSError,
|
OSError,
|
||||||
|
@ -326,6 +333,8 @@ class MikrotikAPI:
|
||||||
librouteros.exceptions.MultiTrapError,
|
librouteros.exceptions.MultiTrapError,
|
||||||
librouteros.exceptions.ProtocolError,
|
librouteros.exceptions.ProtocolError,
|
||||||
librouteros.exceptions.FatalError,
|
librouteros.exceptions.FatalError,
|
||||||
|
socket_timeout,
|
||||||
|
socket_error,
|
||||||
ssl.SSLError,
|
ssl.SSLError,
|
||||||
BrokenPipeError,
|
BrokenPipeError,
|
||||||
OSError,
|
OSError,
|
||||||
|
@ -372,6 +381,8 @@ class MikrotikAPI:
|
||||||
librouteros.exceptions.ProtocolError,
|
librouteros.exceptions.ProtocolError,
|
||||||
librouteros.exceptions.FatalError,
|
librouteros.exceptions.FatalError,
|
||||||
ssl.SSLError,
|
ssl.SSLError,
|
||||||
|
socket_timeout,
|
||||||
|
socket_error,
|
||||||
BrokenPipeError,
|
BrokenPipeError,
|
||||||
OSError,
|
OSError,
|
||||||
ValueError,
|
ValueError,
|
||||||
|
@ -431,6 +442,8 @@ class MikrotikAPI:
|
||||||
librouteros.exceptions.MultiTrapError,
|
librouteros.exceptions.MultiTrapError,
|
||||||
librouteros.exceptions.ProtocolError,
|
librouteros.exceptions.ProtocolError,
|
||||||
librouteros.exceptions.FatalError,
|
librouteros.exceptions.FatalError,
|
||||||
|
socket_timeout,
|
||||||
|
socket_error,
|
||||||
ssl.SSLError,
|
ssl.SSLError,
|
||||||
BrokenPipeError,
|
BrokenPipeError,
|
||||||
OSError,
|
OSError,
|
||||||
|
@ -517,6 +530,8 @@ class MikrotikAPI:
|
||||||
librouteros.exceptions.MultiTrapError,
|
librouteros.exceptions.MultiTrapError,
|
||||||
librouteros.exceptions.ProtocolError,
|
librouteros.exceptions.ProtocolError,
|
||||||
librouteros.exceptions.FatalError,
|
librouteros.exceptions.FatalError,
|
||||||
|
socket_timeout,
|
||||||
|
socket_error,
|
||||||
ssl.SSLError,
|
ssl.SSLError,
|
||||||
BrokenPipeError,
|
BrokenPipeError,
|
||||||
OSError,
|
OSError,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue