mirror of
https://github.com/mtan93/unifi-linux-utils.git
synced 2026-03-07 21:21:57 +00:00
Make sure AP has a name before checking
Fixes KeyError: 'name' issue reported here: https://community.ubnt.com/t5/UniFi-Wireless/UniFi-WiFi-Nagios-Monitoring-Plugin/m-p/1805913#M205041
This commit is contained in:
@@ -88,7 +88,7 @@ for ap in aps:
|
|||||||
offline_names.append(ap['name'])
|
offline_names.append(ap['name'])
|
||||||
|
|
||||||
# If a specific AP was specified, record its specific status
|
# If a specific AP was specified, record its specific status
|
||||||
if ap['name'] == args.ap:
|
if hasattr(ap, 'name') and ap['name'] == args.ap:
|
||||||
ap_state = ap['state']
|
ap_state = ap['state']
|
||||||
if ap['state'] == 1:
|
if ap['state'] == 1:
|
||||||
ap_code = OK
|
ap_code = OK
|
||||||
|
|||||||
Reference in New Issue
Block a user