You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi again, i'm trying to bypass "Traceback" message lines from offline("Timeout") devices. I've tried a lot of exceptions(including nornir.core.exceptions) but can't find solution.
Script:
from nornir import InitNornir
from nornir_netmiko.tasks import netmiko_send_command
from nornir_utils.plugins.functions import print_result
from netmiko.exceptions import NetMikoTimeoutException
from paramiko.ssh_exception import SSHException
from socket import timeout
nr = InitNornir(config_file="config.yml")
try:
result = nr.run(task=netmiko_send_command, command_string="ip address print")
print_result(result)
except (NetMikoTimeoutException, SSHException, timeout):
print("Device is not reachable!")
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi again, i'm trying to bypass "Traceback" message lines from offline("Timeout") devices. I've tried a lot of exceptions(including nornir.core.exceptions) but can't find solution.
Script:
Error:
Beta Was this translation helpful? Give feedback.
All reactions