Verified Commit 5e740cae authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Generic.get_lldp_neighbors. Fix trace wnen local_id not in names.

parent 76f2d1d8
Pipeline #32065 passed with stages
in 24 minutes and 13 seconds
......@@ -55,7 +55,11 @@ class Script(BaseScript):
elif port_subtype == LLDP_PORT_SUBTYPE_MAC:
# Iface MAC address
raise NotImplementedError()
elif port_subtype == LLDP_PORT_SUBTYPE_LOCAL and port_id.isdigit():
elif (
port_subtype == LLDP_PORT_SUBTYPE_LOCAL
and port_id.isdigit()
and int(port_id) in names
):
# Iface local (ifindex)
iface_name = names[int(port_id)]
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment