diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-08-19 13:24:33 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-08-19 14:20:06 -0500 |
commit | c6bdb484203fb374c01c5044d9833856746512e6 (patch) | |
tree | 9b31fbfc0e0ec5cc9d0ef96708262c3056dcf795 /test/deactivate-context | |
parent | b775c434d9e4f2ab6e8b4005343dfc9076b8ea37 (diff) | |
download | ofono-c6bdb484203fb374c01c5044d9833856746512e6.tar.bz2 |
test: update deactivate-context to the new API
Diffstat (limited to 'test/deactivate-context')
-rwxr-xr-x | test/deactivate-context | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/deactivate-context b/test/deactivate-context index 23d2c0c5..9d3774df 100755 --- a/test/deactivate-context +++ b/test/deactivate-context @@ -16,22 +16,22 @@ for path in properties["Modems"]: properties = modem.GetProperties() - if "org.ofono.DataConnectionManager" not in properties["Interfaces"]: + if "org.ofono.ConnectionManager" not in properties["Interfaces"]: continue - connmgr = dbus.Interface(bus.get_object('org.ofono', path), - 'org.ofono.DataConnectionManager') + connman = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.ConnectionManager') - properties = connmgr.GetProperties() + contexts = connman.GetProperties() - if (properties["PrimaryContexts"] == []): + if (len(contexts) == 0): print "No context available" sys.exit(1) - path = properties["PrimaryContexts"][0] + path = contexts[0][0] context = dbus.Interface(bus.get_object('org.ofono', path), - 'org.ofono.PrimaryDataContext') + 'org.ofono.ConnectionContext') try: context.SetProperty("Active", dbus.Boolean(0)) |