summaryrefslogtreecommitdiffstats
path: root/test/hangup-active
diff options
context:
space:
mode:
Diffstat (limited to 'test/hangup-active')
-rwxr-xr-xtest/hangup-active10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/hangup-active b/test/hangup-active
index 8e65bc46..82e0eb0e 100755
--- a/test/hangup-active
+++ b/test/hangup-active
@@ -8,8 +8,14 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
-modems = manager.GetModems()
-path = modems[0][0]
+if (len(sys.argv) == 1):
+ modems = manager.GetModems()
+ path = modems[0][0]
+elif (len(sys.argv) == 2):
+ path = sys.argv[1]
+else:
+ print("Usage: %s [modem]" % (sys.argv[0]))
+ sys.exit(1)
manager = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')