From c5a46a1d330fcfb0b5cc57cb8f38cc98a6362d2c Mon Sep 17 00:00:00 2001 From: gjim83 Date: Thu, 18 Jan 2018 18:23:19 -0600 Subject: [PATCH] Looping over values instead of unnecessarily exctracting items --- napalm_panos/panos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/napalm_panos/panos.py b/napalm_panos/panos.py index f6bdbe7..3757532 100644 --- a/napalm_panos/panos.py +++ b/napalm_panos/panos.py @@ -356,8 +356,8 @@ def _extract_interface_list(self): interface_set = set() - for _, entry in interfaces.items(): - for _, entry_contents in entry.items(): + for entry in interfaces.values(): + for entry_contents in entry.values(): if isinstance(entry_contents, dict): # If only 1 interface is listed, xmltodict returns a dictionary, otherwise # it returns a list of dictionaries.