* [PATCH] enable passing of modem name via command line
@ 2010-01-26 20:58 Gustavo F. Padovan
2010-01-27 18:13 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo F. Padovan @ 2010-01-26 20:58 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1582 bytes --]
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-27 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-26 20:58 [PATCH] enable passing of modem name via command line Gustavo F. Padovan
2010-01-27 18:13 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.