From e6e9ffd7cd3e350163104200cd1446722e3d7be4 Mon Sep 17 00:00:00 2001 From: XioNoX Date: Thu, 26 Jan 2017 08:26:56 +0800 Subject: [PATCH] Simplifies single items lists --- napalm_panos/panos.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/napalm_panos/panos.py b/napalm_panos/panos.py index d62d264..5fdfd79 100644 --- a/napalm_panos/panos.py +++ b/napalm_panos/panos.py @@ -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 = {} @@ -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 = {