diff options
author | Dan Williams <dcbw@redhat.com> | 2010-01-05 18:07:12 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-01-05 18:07:12 -0600 |
commit | 1faead71aa79c148288470b9837e50a36746d6bf (patch) | |
tree | 3497bf6df32cee185e5aa26d0d26be6bdf7269a9 /test | |
parent | c30f23e02c0759ddd333699c7d39fe53bdf159ac (diff) |
test: handle various missing operator strings if the modem doesn't report them
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 157fb0ec..a0af8419 100755 --- a/test/mm-test.py +++ b/test/mm-test.py @@ -224,10 +224,12 @@ def gsm_inspect(proxy, dump_private, do_scan): except KeyError: pass - if len(r['operator-long']): + if r.has_key('operator-long') and len(r['operator-long']): print "%s: %s %s" % (r['operator-long'], status, access_tech) - else: + elif r.has_key('operator-short') and len(r['operator-short']): print "%s: %s %s" % (r['operator-short'], status, access_tech) + else: + print "%s: %s %s" % (r['operator-num'], status, access_tech) def gsm_connect(proxy, apn, user, password): # Modem.Simple interface |