diff options
author | Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com> | 2015-05-18 08:47:08 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2015-05-18 09:08:28 -0500 |
commit | f3f3dabfac5c2f73114ac0c52dd76a18674e10bc (patch) | |
tree | 010a4662a306d9e4205b54011413f3d74ccd55a1 /test | |
parent | 4c0f783f5c6e6dfcbd495b2c12cf4b650f073099 (diff) | |
download | ofono-f3f3dabfac5c2f73114ac0c52dd76a18674e10bc.tar.gz |
test: Add script for resetting contexts
Diffstat (limited to 'test')
-rw-r--r-- | test/reset-contexts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/reset-contexts b/test/reset-contexts new file mode 100644 index 00000000..16766362 --- /dev/null +++ b/test/reset-contexts @@ -0,0 +1,20 @@ +#!/usr/bin/python3 + +import dbus +import sys + +bus = dbus.SystemBus() + +if len(sys.argv) == 2: + path = sys.argv[1] +else: + manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + modems = manager.GetModems() + path = modems[0][0] + +print("Resetting contexts for SIM on modem %s..." % path) +cm = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.ConnectionManager') + +cm.ResetContexts() |