diff --git a/app/backup.py b/app/backup.py index c341940..2a5e546 100644 --- a/app/backup.py +++ b/app/backup.py @@ -77,7 +77,7 @@ def send_command(connection: ConnectHandler, command: str) -> str: except exceptions.NetmikoTimeoutException: result = "NetmikoTimeoutException" except exceptions.ReadTimeout: - result = "NetmikoTimeoutException" + result = "ReadTimeout" return result @@ -93,6 +93,9 @@ def save_mikrotik_bcp(host: str, name: str) -> None: result = send_command(connection, "export terse show-sensitive") connection.disconnect() if result == "NetmikoTimeoutException": + log.warning("Timeout error %r", name) + return + elif result == "ReadTimeout": log.warning("Timeout read config from %r", name) return log.info("disconnected from %r", name)