aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/mm-test.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/mm-test.py b/test/mm-test.py
index bbd634df..cb9ecf0a 100755
--- a/test/mm-test.py
+++ b/test/mm-test.py
@@ -229,7 +229,12 @@ def gsm_connect(proxy, apn, user, password):
# Modem.Simple interface
simple = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM_SIMPLE)
try:
- simple.Connect({'apn': apn, 'number':"*99#"}, timeout=120)
+ opts = {'apn': apn, 'number':"*99#"}
+ if user is not None:
+ opts['username'] = user
+ if password is not None:
+ opts['password'] = password
+ simple.Connect(opts, timeout=120)
print "\nConnected!"
except Exception, e:
print "Error connecting: %s" % e