From bd7b419a4eaf87bc46fd7ff49c9d843b6ba73561 Mon Sep 17 00:00:00 2001 From: Matt Purnell <65473602+mpurnell1@users.noreply.github.com> Date: Fri, 7 Aug 2026 12:36:52 -0500 Subject: [PATCH] ui: don't spam logs when NetworkManager is not available (#38504) --- openpilot/system/ui/lib/wifi_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openpilot/system/ui/lib/wifi_manager.py b/openpilot/system/ui/lib/wifi_manager.py index edf91ae2ea..26474be942 100644 --- a/openpilot/system/ui/lib/wifi_manager.py +++ b/openpilot/system/ui/lib/wifi_manager.py @@ -515,8 +515,11 @@ class WifiManager: def _get_adapter(self, adapter_type: int) -> str | None: # Return the first NetworkManager device path matching adapter_type try: - device_paths = self._router_main.send_and_get_reply(new_method_call(self._nm, 'GetDevices')).body[0] - for device_path in device_paths: + reply = self._router_main.send_and_get_reply(new_method_call(self._nm, 'GetDevices')) + if reply.header.message_type == MessageType.error: + # NetworkManager is not available, body holds an error string instead of device paths + return None + for device_path in reply.body[0]: dev_addr = DBusAddress(device_path, bus_name=NM, interface=NM_DEVICE_IFACE) dev_type = self._router_main.send_and_get_reply(Properties(dev_addr).get('DeviceType')).body[0][1] if dev_type == adapter_type: