mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-20 19:12: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)
|
return str(d)
|
||||||
|
|
||||||
def property_changed(name, value, path, interface):
|
def properties_changed(interface, changed, invalidated, path):
|
||||||
iface = interface[interface.rfind(".") + 1:]
|
iface = interface[interface.rfind(".") + 1:]
|
||||||
|
for name, value in changed.items():
|
||||||
print("{%s} [%s] %s = %s" % (iface, path, name, pretty(value)))
|
print("{%s} [%s] %s = %s" % (iface, path, name, pretty(value)))
|
||||||
|
|
||||||
relevant_ifaces = [ "net.connman.iwd.Device",
|
relevant_ifaces = [ "net.connman.iwd.Device",
|
||||||
@ -83,11 +84,11 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
bus = dbus.SystemBus()
|
bus = dbus.SystemBus()
|
||||||
|
|
||||||
bus.add_signal_receiver(property_changed,
|
bus.add_signal_receiver(properties_changed,
|
||||||
bus_name="net.connman.iwd",
|
bus_name="net.connman.iwd",
|
||||||
signal_name = "PropertyChanged",
|
dbus_interface="org.freedesktop.DBus.Properties",
|
||||||
path_keyword="path",
|
signal_name="PropertiesChanged",
|
||||||
interface_keyword="interface")
|
path_keyword="path")
|
||||||
|
|
||||||
bus.add_signal_receiver(interfaces_added, bus_name="net.connman.iwd",
|
bus.add_signal_receiver(interfaces_added, bus_name="net.connman.iwd",
|
||||||
dbus_interface="org.freedesktop.DBus.ObjectManager",
|
dbus_interface="org.freedesktop.DBus.ObjectManager",
|
||||||
|
Loading…
Reference in New Issue
Block a user