mirror of git://git.sysmocom.de/ofono
Enable passing of modem name via command line
This commit is contained in:
parent
4c6497e317
commit
0391f0a9bf
|
@ -1,15 +1,17 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import dbus
|
||||
import sys
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
|
||||
properties = manager.GetProperties()
|
||||
|
||||
path = properties["Modems"][0]
|
||||
if len(sys.argv) == 2:
|
||||
path = sys.argv[1]
|
||||
else:
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
properties = manager.GetProperties()
|
||||
path = properties["Modems"][0]
|
||||
|
||||
modem = dbus.Interface(bus.get_object('org.ofono', path),
|
||||
'org.ofono.Modem')
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import dbus
|
||||
import sys
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
|
||||
properties = manager.GetProperties()
|
||||
|
||||
path = properties["Modems"][0]
|
||||
if len(sys.argv) == 2:
|
||||
path = sys.argv[1]
|
||||
else:
|
||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||
'org.ofono.Manager')
|
||||
properties = manager.GetProperties()
|
||||
path = properties["Modems"][0]
|
||||
|
||||
modem = dbus.Interface(bus.get_object('org.ofono', path),
|
||||
'org.ofono.Modem')
|
||||
|
|
Loading…
Reference in New Issue