mirror of git://git.sysmocom.de/ofono
test: Add option to also enable other than the first context
This commit is contained in:
parent
56d46ae16b
commit
fcc064e55c
|
@ -25,7 +25,10 @@ for path, properties in modems:
|
||||||
|
|
||||||
connman.SetProperty("Powered", dbus.Boolean(1))
|
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),
|
context = dbus.Interface(bus.get_object('org.ofono', path),
|
||||||
'org.ofono.ConnectionContext')
|
'org.ofono.ConnectionContext')
|
||||||
|
|
|
@ -23,7 +23,10 @@ for path, properties in modems:
|
||||||
print "No context available"
|
print "No context available"
|
||||||
sys.exit(1)
|
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),
|
context = dbus.Interface(bus.get_object('org.ofono', path),
|
||||||
'org.ofono.ConnectionContext')
|
'org.ofono.ConnectionContext')
|
||||||
|
|
Loading…
Reference in New Issue