diff --git a/main.py b/main.py index 89ede86..f9137a0 100644 --- a/main.py +++ b/main.py @@ -43,10 +43,13 @@ def main(): ## pull all the UPSes froom each host into a nice dict for host in hostList: - upslist[host] = [] - client = PyNUTClient(host, '3493') - for UPS in client.list_ups(): - upslist[host].append(UPS) + try: + upslist[host] = [] + client = PyNUTClient(host, '3493') + for UPS in client.list_ups(): + upslist[host].append(UPS) + except: + print('UPS {} is having issues'.format(host)) # print(upslist)