From: Marcel Holtmann Date: Wed, 30 Jul 2008 23:00:21 +0000 (+0200) Subject: Fix broken start-scanning test script X-Git-Tag: 0.1~273 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51671d4aa4c0e487e875c960510cea0da2749bf1;p=platform%2Fupstream%2Fconnman.git Fix broken start-scanning test script --- diff --git a/test/start-scanning b/test/start-scanning index b593323..9b5878b 100755 --- a/test/start-scanning +++ b/test/start-scanning @@ -7,19 +7,22 @@ bus = dbus.SystemBus() manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"), 'org.moblin.connman.Manager') -interfaces = manager.ListInterfaces() +elements = manager.ListElements() -for path in interfaces: - print "[ %s ]" % (path) +for path in elements: + element = dbus.Interface(bus.get_object('org.moblin.connman', path), + 'org.moblin.connman.Element') + + properties = element.GetProperties() - interface = dbus.Interface(bus.get_object('org.moblin.connman', path), - 'org.moblin.connman.Interface') + if (properties["Type"] != "device"): + continue - properties = interface.GetProperties() + print "[ %s ]" % (path) - if (properties["Type"] == "80211"): + if (properties["Subtype"] == "wifi"): print " Started scanning" - interface.Scan() + element.Update() else: print " No scanning"