[PATCH 2/5] tests/ussd.py: improve help message
- From: Guido Günther <agx sigxcpu org>
- To: NetworkManager-list gnome org
- Subject: [PATCH 2/5] tests/ussd.py: improve help message
- Date: Sun, 17 Jul 2011 20:18:47 +0200
---
test/ussd.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/ussd.py b/test/ussd.py
index 2040f12..b3528f9 100755
--- a/test/ussd.py
+++ b/test/ussd.py
@@ -20,16 +20,16 @@ import sys, dbus, re
MM_DBUS_SERVICE='org.freedesktop.ModemManager'
MM_DBUS_INTERFACE_USSD='org.freedesktop.ModemManager.Modem.Gsm.Ussd'
-bus = dbus.SystemBus()
-proxy = bus.get_object(MM_DBUS_SERVICE, sys.argv[1])
-modem = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_USSD)
-
if len(sys.argv) != 3:
- print "Usage: %s dbus_object ussd"
+ print "Usage: %s dbus_object [<ussd>|cancel]" % sys.argv[0]
sys.exit(1)
else:
arg = sys.argv[2]
+bus = dbus.SystemBus()
+proxy = bus.get_object(MM_DBUS_SERVICE, sys.argv[1])
+modem = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_USSD)
+
# For testing purposes treat all "common" USSD sequences as initiate and the
# rest (except for cancel) as response. See GSM 02.90.
initiate_re = re.compile('[*#]{1,3}1[0-9][0-9].*#')
--
1.7.5.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]