Skip to content

Commit

Permalink
Test for interfaces with no lldp neighbor
Browse files Browse the repository at this point in the history
  • Loading branch information
itdependsnetworks authored and GGabriele committed Mar 1, 2017
1 parent bc55c7f commit dff36c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions napalm_panos/panos.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,10 @@ def get_lldp_neighbors(self):

if local_int not in neighbors.keys():
neighbors[local_int] = []

lldp_neighs = lldp_item['neighbors']['entry']
try:
lldp_neighs = lldp_item.get('neighbors').get('entry')
except AttributeError:
lldp_neighs = ''
if isinstance(lldp_neighs, dict):
lldp_neighs = [lldp_neighs]

Expand Down

0 comments on commit dff36c8

Please sign in to comment.