fix delay factor

This commit is contained in:
s.mostryukov 2025-06-22 14:26:32 +03:00
parent df0e4da626
commit 2280196956
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ def connect_to_device(vendor: str, host: str, name: str="") -> ConnectHandler:
conn_conf["username"] = cfg.net_dev.domain + "\\" + cfg.net_dev.user conn_conf["username"] = cfg.net_dev.domain + "\\" + cfg.net_dev.user
try: try:
connection: ConnectHandler = ConnectHandler(**conn_conf) connection: ConnectHandler = ConnectHandler(**conn_conf)
log.info("connect to %s %s", name, host) log.info("connect to %s %s %s", vendor, name, host)
return connection return connection
except exceptions.NetmikoAuthenticationException: except exceptions.NetmikoAuthenticationException:
log.warning("Authentication error %s %s ", name, host) log.warning("Authentication error %s %s ", name, host)
@ -78,7 +78,7 @@ def connect_to_device(vendor: str, host: str, name: str="") -> ConnectHandler:
def send_command(connection: ConnectHandler, command: str) -> str: def send_command(connection: ConnectHandler, command: str) -> str:
log.info("send command") log.info("send command")
try: try:
result: str = connection.send_command(command, read_timeout=cfg.net_dev.read_timeout, delay_factor=2) result: str = connection.send_command(command, read_timeout=cfg.net_dev.read_timeout, delay_factor=cfg.net_dev.delay_factor)
log.info('command send success') log.info('command send success')
except exceptions.NetmikoTimeoutException: except exceptions.NetmikoTimeoutException:
result = "NetmikoTimeoutException" result = "NetmikoTimeoutException"