summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/disable-modem14
-rwxr-xr-xtest/enable-modem14
2 files changed, 16 insertions, 12 deletions
diff --git a/test/disable-modem b/test/disable-modem
index dee34fdf..47b85319 100755
--- a/test/disable-modem
+++ b/test/disable-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')
diff --git a/test/enable-modem b/test/enable-modem
index 0f9f604f..86362af7 100755
--- a/test/enable-modem
+++ b/test/enable-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')