Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Commit

Permalink
Merge pull request #175 from bewing/iss174
Browse files Browse the repository at this point in the history
Don't swallow exceptions retrieving mac table
  • Loading branch information
bewing committed Aug 8, 2017
2 parents bff0185 + 87259e6 commit 2c04fcf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions napalm_eos/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,12 +965,8 @@ def get_mac_address_table(self):

commands = ['show mac address-table']

mac_entries = []
try:
mac_entries = self.device.run_commands(commands)[0].get(
'unicastTable', {}).get('tableEntries', [])
except Exception:
return {}
mac_entries = self.device.run_commands(commands)[0].get(
'unicastTable', {}).get('tableEntries', [])

for mac_entry in mac_entries:
vlan = mac_entry.get('vlanId')
Expand Down

0 comments on commit 2c04fcf

Please sign in to comment.