Skip to content

netmiko.exceptions.NetmikoTimeoutException #3048

Answered by ktbyers
exlr8in asked this question in Q&A
Discussion options

You must be logged in to vote

This worked fine for me:

from netmiko import ConnectHandler, NetmikoTimeoutException

try:
    net_connect = ConnectHandler(**my_device)

    output = net_connect.send_command("show ip int brief")
    print(output)
    net_connect.disconnect()
except NetmikoTimeoutException:
    print("Connection failed")

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ktbyers
Comment options

Answer selected by exlr8in
Comment options

You must be logged in to vote
1 reply
@exlr8in
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants