Reduce wifi dbus calls pt. 3 (#37172)

* fewer calls to set metered

* print

* hell yeah

* Revert "hell yeah"

This reverts commit 0e0786bc204821329febc62a1b8dfd870e9aeb6e.

* Revert "print"

This reverts commit e9c7550496e9835888cb71c7dd622cbfb4624fbf.
This commit is contained in:
Shane Smiskol
2026-02-11 15:25:53 -08:00
committed by GitHub
parent d977a5bd62
commit cddc3b9e8f
+3 -3
View File
@@ -555,10 +555,10 @@ class WifiManager:
def worker():
for active_conn in self._get_active_connections():
conn_addr = DBusAddress(active_conn, bus_name=NM, interface=NM_ACTIVE_CONNECTION_IFACE)
conn_type = self._router_main.send_and_get_reply(Properties(conn_addr).get('Type')).body[0][1]
props = self._router_main.send_and_get_reply(Properties(conn_addr).get_all()).body[0]
if conn_type == '802-11-wireless' and not self.is_tethering_active():
conn_path = self._router_main.send_and_get_reply(Properties(conn_addr).get('Connection')).body[0][1]
if props.get('Type', ('s', ''))[1] == '802-11-wireless' and not self.is_tethering_active():
conn_path = props.get('Connection', ('o', '/'))[1]
if conn_path == "/":
continue