From b7164c35e36464ba3a57526450adbe95b594b03c Mon Sep 17 00:00:00 2001 From: Tobias Date: Mon, 20 May 2024 13:22:21 +0200 Subject: [PATCH 1/2] try fix #36 --- unifi_respondd/unifi_client.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/unifi_respondd/unifi_client.py b/unifi_respondd/unifi_client.py index 52a36f5..5d89613 100644 --- a/unifi_respondd/unifi_client.py +++ b/unifi_respondd/unifi_client.py @@ -167,8 +167,13 @@ def get_infos(): site_id=site["name"], ssl_verify=cfg.ssl_verify, ) - else: - c.switch_site(site["desc"]) + else: + try: + c.switch_site(site["desc"]) + except Exception as ex: + logger.error("Error: %s" % (ex)) + continue + aps_for_site = c.get_aps() clients = c.get_clients() for ap in aps_for_site: From 37469c99759770e878bb7fe9d766d95e99e10d67 Mon Sep 17 00:00:00 2001 From: Tobias Date: Mon, 20 May 2024 13:23:20 +0200 Subject: [PATCH 2/2] run black --- unifi_respondd/unifi_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unifi_respondd/unifi_client.py b/unifi_respondd/unifi_client.py index 5d89613..313921f 100644 --- a/unifi_respondd/unifi_client.py +++ b/unifi_respondd/unifi_client.py @@ -167,13 +167,13 @@ def get_infos(): site_id=site["name"], ssl_verify=cfg.ssl_verify, ) - else: + else: try: c.switch_site(site["desc"]) except Exception as ex: logger.error("Error: %s" % (ex)) continue - + aps_for_site = c.get_aps() clients = c.get_clients() for ap in aps_for_site: