diff options
author | Dan Williams <dcbw@redhat.com> | 2009-12-11 12:53:50 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2009-12-11 12:53:50 -0800 |
commit | eaf167bebdc24c992b0a7b130432064eb5c537b7 (patch) | |
tree | e9a40d0f4c73a951c96dd2f3a3912dcd52884c65 /test | |
parent | 41ea9a0e4bc3817fa060d54c7c7df7a8606eb9d1 (diff) |
test: argument parsing and connect improvements
Diffstat (limited to 'test')
-rwxr-xr-x | test/mm-test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/mm-test.py b/test/mm-test.py index e1d68b0f..0e82bc9d 100755 --- a/test/mm-test.py +++ b/test/mm-test.py @@ -230,7 +230,9 @@ def gsm_connect(proxy, apn, user, password): # Modem.Simple interface simple = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM_SIMPLE) try: - opts = {'apn': apn, 'number':"*99#"} + opts = {'number':"*99#"} + if apn is not None: + opts['apn'] = apn if user is not None: opts['username'] = user if password is not None: @@ -252,7 +254,7 @@ while x < len(sys.argv): dump_private = True elif sys.argv[x] == "--connect": connect = True - elif sys.argv[x] == "--user": + elif (sys.argv[x] == "--user" or sys.argv[x] == "--username"): x += 1 user = sys.argv[x] elif sys.argv[x] == "--apn": |