Skip to content

Commit

Permalink
Looping over values instead of unnecessarily exctracting items
Browse files Browse the repository at this point in the history
  • Loading branch information
gjim83 committed Jan 19, 2018
1 parent 2383ed8 commit c5a46a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions napalm_panos/panos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c5a46a1

Please sign in to comment.