Skip to content

Commit

Permalink
Fixing loopback sub-if evaluation and unk admin state exception messa…
Browse files Browse the repository at this point in the history
…ge string
  • Loading branch information
gjim83 committed Jan 19, 2018
1 parent c5a46a1 commit 72e31d3
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 @@ -525,7 +525,7 @@ def get_interfaces(self):
interface_info_json = json.dumps(interface_info_xml['response']['result']['hw'])
interface_info = json.loads(interface_info_json)
except KeyError as err:
if 'loopback.' in interface and 'hw' in str(err):
if 'loopback.' in intf and 'hw' in str(err):
# loopback sub-ifs don't return a 'hw' key
interface_dict[intf] = LOOPBACK_SUBIF_DEFAULTS
continue
Expand All @@ -539,7 +539,7 @@ def get_interfaces(self):
elif conf_state in ('up', 'auto'):
interface['is_enabled'] = True
else:
msg = 'Unknown configured state {} for interface {}'.format(conf_state, name)
msg = 'Unknown configured state {} for interface {}'.format(conf_state, intf)
raise RuntimeError(msg)

interface['last_flapped'] = -1.0
Expand Down

0 comments on commit 72e31d3

Please sign in to comment.