From 6c1cfd86a98c5214313f1d7808f6eaa0ea5b852d Mon Sep 17 00:00:00 2001 From: itdependsnetworks Date: Sat, 12 Oct 2019 21:51:48 -0400 Subject: [PATCH] Update lldp when single entry is shown --- napalm_panos/panos.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/napalm_panos/panos.py b/napalm_panos/panos.py index ede44c0..752347f 100644 --- a/napalm_panos/panos.py +++ b/napalm_panos/panos.py @@ -409,6 +409,11 @@ def get_lldp_neighbors(self): except AttributeError: lldp_table = [] + if isinstance(lldp_table,dict): + # If only 1 interface is listed, xmltodict returns a dictionary, otherwise + # it returns a list of dictionaries. + lldp_table = [lldp_table] + for lldp_item in lldp_table: local_int = lldp_item['@name']