From a479b58f50f65a736e05e5abe7278b6feb6be899 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 31 Aug 2009 14:30:06 -0500 Subject: test: don't bail out on errors parsing CDMA serving system results --- test/mm-test.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test/mm-test.py') diff --git a/test/mm-test.py b/test/mm-test.py index dd83f608..d83223a8 100755 --- a/test/mm-test.py +++ b/test/mm-test.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -46,10 +47,14 @@ def inspect_cdma(proxy, dump_private): print "ESN: %s" % esn print "-------------------" - info = cdma.GetServingSystem() - print "Class: %s" % get_cdma_band_class(info[0]) - print "Band: %s" % info[1] - print "SID: %d" % info[2] + + try: + info = cdma.GetServingSystem() + print "Class: %s" % get_cdma_band_class(info[0]) + print "Band: %s" % info[1] + print "SID: %d" % info[2] + except dbus.exceptions.DBusException, e: + print "Error reading serving system: %s" % e def get_gsm_network_mode(modem): -- cgit v1.2.3-70-g09d2