Skip to content

Commit cb5d7dd

Browse files
jtisheyktbyers
authored andcommitted
IOS get_bgp_neighbors check for None type neighbor_entry (#844)
1 parent f21dd59 commit cb5d7dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

napalm/ios/ios.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,10 @@ def get_bgp_neighbors(self):
12791279
napalm.base.helpers.ip(neighbor['remote_addr']) == remote_addr):
12801280
neighbor_entry = neighbor
12811281
break
1282-
if not isinstance(neighbor_entry, dict):
1282+
# check for proper session data for the afi
1283+
if neighbor_entry is None:
1284+
continue
1285+
elif not isinstance(neighbor_entry, dict):
12831286
raise ValueError(msg="Couldn't find neighbor data for %s in afi %s" %
12841287
(remote_addr, afi))
12851288

0 commit comments

Comments
 (0)