3
0
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:
Andrew Zaborowski 2016-09-21 18:51:56 +02:00 committed by Denis Kenzior
parent 0ffec2e481
commit c64534135d

View File

@ -52,9 +52,10 @@ 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:]
print("{%s} [%s] %s = %s" % (iface, path, name, pretty(value)))
for name, value in changed.items():
print("{%s} [%s] %s = %s" % (iface, path, name, pretty(value)))
relevant_ifaces = [ "net.connman.iwd.Device",
"net.connman.iwd.Adapter",
@ -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",