X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=test%2Flist-devices;h=691a6fbe482c5fc8719b67f7b614f76e939adaca;hb=6d38280e351fc249725e6928bd330cf2dbb23717;hp=3c1b82e926fb3af0f0501efbb81966af596f99fe;hpb=9b4c51a543c5dd205bf5134f02f446077c1168f0;p=connman diff --git a/test/list-devices b/test/list-devices index 3c1b82e..691a6fb 100755 --- a/test/list-devices +++ b/test/list-devices @@ -7,15 +7,13 @@ bus = dbus.SystemBus() manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"), "org.moblin.connman.Manager") -elements = manager.ListElements() +properties = manager.GetProperties() -for path in elements: - element = dbus.Interface(bus.get_object("org.moblin.connman", path), - "org.moblin.connman.Element") +for path in properties["Devices"]: + device = dbus.Interface(bus.get_object("org.moblin.connman", path), + "org.moblin.connman.Device") - properties = element.GetProperties() - if (properties["Type"] != "device"): - continue + properties = device.GetProperties() print "[ %s ]" % (path)