X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=test%2Fdisable-device;h=31e9f9514075492dd35bec03577c249968a636ea;hb=ac83f1cd2872ecc88b4276eeda02fce2ebec553c;hp=ac55e77ae49701fc5dc9261965bea2fcf946be24;hpb=6ca9fc9115f323d7358b146096994c7f2ba344b5;p=connman diff --git a/test/disable-device b/test/disable-device index ac55e77..31e9f95 100755 --- a/test/disable-device +++ b/test/disable-device @@ -7,17 +7,17 @@ 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() + properties = device.GetProperties() - if (properties["Type"] != "device"): + if (properties["Powered"] == dbus.Boolean(0)): continue print "[ %s ]" % (path) - element.Disable() + device.SetProperty("Powered", dbus.Boolean(0));