diff --git a/system/ui/lib/wifi_manager.py b/system/ui/lib/wifi_manager.py index a6de44bad8..64621a8afb 100644 --- a/system/ui/lib/wifi_manager.py +++ b/system/ui/lib/wifi_manager.py @@ -162,16 +162,6 @@ class WifiManager: print('SETTING ACTIVE', active) self._active = active - def _wait_for_wifi_device(self) -> dbus.ObjectPath: - with self._lock: - device_path: dbus.ObjectPath | None = None - while not self._exit: - device_path = self._get_wifi_device() - if device_path is not None: - break - time.sleep(1) - return device_path - def _monitor_state(self): device_path: dbus.ObjectPath = self._wait_for_wifi_device() props_dev = dbus.Interface(self._monitor_bus.get_object(NM, device_path), NM_PROPERTIES_IFACE) @@ -226,6 +216,16 @@ class WifiManager: time.sleep(5) + def _wait_for_wifi_device(self) -> dbus.ObjectPath: + with self._lock: + device_path: dbus.ObjectPath | None = None + while not self._exit: + device_path = self._get_wifi_device() + if device_path is not None: + break + time.sleep(1) + return device_path + def _get_wifi_device(self) -> dbus.ObjectPath | None: if self._wifi_device is not None: return self._wifi_device