test: Add option to also enable other than the first context

This commit is contained in:
Marcel Holtmann 2010-10-21 21:44:51 +02:00
parent 56d46ae16b
commit fcc064e55c
2 changed files with 8 additions and 2 deletions

View File

@ -25,7 +25,10 @@ for path, properties in modems:
connman.SetProperty("Powered", dbus.Boolean(1))
path = contexts[0][0]
if len(sys.argv) > 1:
path = contexts[int(sys.argv[1])][0]
else:
path = contexts[0][0]
context = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.ConnectionContext')

View File

@ -23,7 +23,10 @@ for path, properties in modems:
print "No context available"
sys.exit(1)
path = contexts[0][0]
if len(sys.argv) > 1:
path = contexts[int(sys.argv[1])][0]
else:
path = contexts[0][0]
context = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.ConnectionContext')