mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-20 10:52:33 +01:00
test: Switch monitor-iwd to org.freedesktop.DBus.Properties
Other test scripts and autotests don't seem to need changes.
This commit is contained in:
parent
0ffec2e481
commit
c64534135d
@ -52,8 +52,9 @@ def pretty(d):
|
||||
|
||||
return str(d)
|
||||
|
||||
def property_changed(name, value, path, interface):
|
||||
def properties_changed(interface, changed, invalidated, path):
|
||||
iface = interface[interface.rfind(".") + 1:]
|
||||
for name, value in changed.items():
|
||||
print("{%s} [%s] %s = %s" % (iface, path, name, pretty(value)))
|
||||
|
||||
relevant_ifaces = [ "net.connman.iwd.Device",
|
||||
@ -83,11 +84,11 @@ if __name__ == '__main__':
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
|
||||
bus.add_signal_receiver(property_changed,
|
||||
bus.add_signal_receiver(properties_changed,
|
||||
bus_name="net.connman.iwd",
|
||||
signal_name = "PropertyChanged",
|
||||
path_keyword="path",
|
||||
interface_keyword="interface")
|
||||
dbus_interface="org.freedesktop.DBus.Properties",
|
||||
signal_name="PropertiesChanged",
|
||||
path_keyword="path")
|
||||
|
||||
bus.add_signal_receiver(interfaces_added, bus_name="net.connman.iwd",
|
||||
dbus_interface="org.freedesktop.DBus.ObjectManager",
|
||||
|
Loading…
Reference in New Issue
Block a user