diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-01-31 17:34:06 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-01-31 17:34:06 -0800 |
commit | cec618e31bd2dd646f5c44791c4f131b722285a5 (patch) | |
tree | 6b017263ed7d8e53f56e405de1303ae6a9e4b56e /test | |
parent | 94e9c5c253af7c36875e85297ac4806a8ed7f154 (diff) | |
download | connman-cec618e31bd2dd646f5c44791c4f131b722285a5.tar.gz connman-cec618e31bd2dd646f5c44791c4f131b722285a5.tar.bz2 connman-cec618e31bd2dd646f5c44791c4f131b722285a5.zip |
Fix service property monitoring handling
Diffstat (limited to 'test')
-rwxr-xr-x | test/monitor-services | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/test/monitor-services b/test/monitor-services index 9b293c7e..f1d7cf1c 100755 --- a/test/monitor-services +++ b/test/monitor-services @@ -13,11 +13,8 @@ def extract_values(values): val += " }" return val -def property_changed(name, value, path, interface): - iface = interface[interface.rfind(".") + 1:] - ipath = path[path.rfind("/") + 1:] - if iface not in ["Service"]: - return +def property_changed(name, value, path): + service = path[path.rfind("/") + 1:] if name in ["Profiles", "Services", "Providers", "Technologies", "Devices", "Networks"]: val = "[" @@ -30,7 +27,7 @@ def property_changed(name, value, path, interface): val = int(value) else: val = str(value) - print "{%s} [%s] %s = %s" % (iface, ipath, name, val) + print "[%s] %s = %s" % (service, name, val) if __name__ == '__main__': dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) @@ -38,10 +35,10 @@ if __name__ == '__main__': bus = dbus.SystemBus() bus.add_signal_receiver(property_changed, - bus_name="org.moblin.connman", - signal_name = "PropertyChanged", - path_keyword="path", - interface_keyword="interface") + bus_name="org.moblin.connman", + dbus_interface="org.moblin.connman.Service", + signal_name = "PropertyChanged", + path_keyword="path") mainloop = gobject.MainLoop() mainloop.run() |