Skip to content

Commit

Permalink
Merge pull request #6 from infrasonar/dev
Browse files Browse the repository at this point in the history
Fix missing key (`mac_table`).
  • Loading branch information
joente authored Apr 19, 2024
2 parents 8379aac + 5f66495 commit 5e5eab1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/check/unifidevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async def check_unifidevice(
'tx_power': vap.get('tx_power'), # int
'satisfaction': uint(vap.get('satisfaction')), # int/opt
}
for vap in device['vap_table'] if 'name' if vap.get('name')
for vap in device['vap_table'] if vap.get('name')
]
vap_complete = len(vap) == len(device['vap_table'])
state['vap'] = vap
Expand Down Expand Up @@ -213,7 +213,7 @@ async def check_unifidevice(
'tx_multicast': port['tx_multicast'], # int
'tx_packets': port['tx_packets'], # int
})
for mac in port['mac_table']:
for mac in port.get('mac_table', []):
if mac['mac'] in mac_set:
mac_duplicate.add(mac['mac'])
continue
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
aiohttp==3.9.1
aiohttp==3.9.3
libprobe==0.2.36

0 comments on commit 5e5eab1

Please sign in to comment.