Skip to content

Commit

Permalink
Simplifies single items lists
Browse files Browse the repository at this point in the history
  • Loading branch information
XioNoX authored and GGabriele committed Jan 27, 2017
1 parent a2c0311 commit e6e9ffd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions napalm_panos/panos.py
Expand Up @@ -401,9 +401,7 @@ def get_lldp_neighbors(self):

lldp_neighs = lldp_item['neighbors']['entry']
if isinstance(lldp_neighs, dict):
single_item_list = []
single_item_list.append(lldp_neighs)
lldp_neighs = single_item_list
lldp_neighs = [lldp_neighs]

for neighbor in lldp_neighs:
n = {}
Expand Down Expand Up @@ -435,9 +433,7 @@ def get_route_to(self, destination='', protocol=''):
routes_table = []

if isinstance(routes_table, dict):
single_item_list = []
single_item_list.append(routes_table)
routes_table = single_item_list
routes_table = [routes_table]

for route in routes_table:
d = {
Expand Down

0 comments on commit e6e9ffd

Please sign in to comment.