Skip to content

Commit

Permalink
IOS get_bgp_neighbors check for None type neighbor_entry (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtishey authored and ktbyers committed Oct 25, 2018
1 parent f21dd59 commit cb5d7dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion napalm/ios/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,10 @@ def get_bgp_neighbors(self):
napalm.base.helpers.ip(neighbor['remote_addr']) == remote_addr):
neighbor_entry = neighbor
break
if not isinstance(neighbor_entry, dict):
# check for proper session data for the afi
if neighbor_entry is None:
continue
elif not isinstance(neighbor_entry, dict):
raise ValueError(msg="Couldn't find neighbor data for %s in afi %s" %
(remote_addr, afi))

Expand Down

0 comments on commit cb5d7dd

Please sign in to comment.