diff options
author | Aki Niemi <aki.niemi@nokia.com> | 2010-04-16 22:42:27 +0300 |
---|---|---|
committer | Aki Niemi <aki.niemi@nokia.com> | 2010-04-20 14:16:33 +0300 |
commit | 1e75518c30861a39be8f47295f413590583ff3f3 (patch) | |
tree | 0a9f7b1ccc42b7678d4f79a6aba07d0b3406d355 /test/create-context | |
parent | 144b30ac6d0f2267d0ddc7fea49a72f0d7b107a2 (diff) | |
download | ofono-1e75518c30861a39be8f47295f413590583ff3f3.tar.bz2 |
Improve GPRS test scripts
Catch some errors and add a script for removing contexts.
Diffstat (limited to 'test/create-context')
-rwxr-xr-x | test/create-context | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/create-context b/test/create-context index 08f29600..46b9d620 100755 --- a/test/create-context +++ b/test/create-context @@ -32,6 +32,10 @@ for path in properties["Modems"]: context = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.PrimaryDataContext') - context.SetProperty("AccessPointName", sys.argv[1]) + try: + context.SetProperty("AccessPointName", sys.argv[1]) + except IndexError: + print "Usage: %s <apn_name>" % sys.argv[0] + exit(1) print "Setting APN of %s to %s" % (path, sys.argv[1]) |