From 4ce6f7fdb67d1add69a390af5f504ab0db061109 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 22 Aug 2025 15:20:02 -0700 Subject: [PATCH] safe wrap --- system/ui/lib/wifi_manager_v2.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/system/ui/lib/wifi_manager_v2.py b/system/ui/lib/wifi_manager_v2.py index aa93ac4f29..a405f48619 100644 --- a/system/ui/lib/wifi_manager_v2.py +++ b/system/ui/lib/wifi_manager_v2.py @@ -242,11 +242,15 @@ class WifiManager: for ap_path in wifi_iface.GetAllAccessPoints(): ap_props = dbus.Interface(self._bus.get_object(NM, ap_path), NM_PROPERTIES_IFACE) - ap = AccessPoint.from_dbus(ap_props, ap_path, active_ap_path) - if ap.ssid not in aps: - aps[ap.ssid] = [] - - aps[ap.ssid].append(ap) + try: + ap = AccessPoint.from_dbus(ap_props, ap_path, active_ap_path) + if ap.ssid not in aps: + aps[ap.ssid] = [] + + aps[ap.ssid].append(ap) + except dbus.exceptions.DBusException: + # some APs have been seen dropping off during iteration + cloudlog.exception(f"Failed to get AP properties for {ap_path}") self._networks = [Network.from_dbus(ssid, ap_list, active_ap_path) for ssid, ap_list in aps.items()] if self._networks_updated is not None: