mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user