---
test/disable-modem | 14 ++++++++------
test/enable-modem | 14 ++++++++------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/test/disable-modem b/test/disable-modem
index dee34fd..47b8531 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 0f9f604..86362af 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')
--
1.6.4.4
Show replies by date
Hi Gustavo,
---
test/disable-modem | 14 ++++++++------
test/enable-modem | 14 ++++++++------
2 files changed, 16 insertions(+), 12 deletions(-)
Patch has been applied, thanks.
Regards,
-Denis