pull/36039/head
Shane Smiskol 5 days ago
parent 1b0d86e8e4
commit 92c1c2a5fc
  1. 20
      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

Loading…
Cancel
Save