From d5b0574f587ddab904d3a1f1af3cb2c354486f66 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sun, 29 Nov 2009 18:56:29 -0800 Subject: [PATCH] test: handle scan errors more gracefully --- test/mm-test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/mm-test.py b/test/mm-test.py index 485f596d..cb6bad2b 100755 --- a/test/mm-test.py +++ b/test/mm-test.py @@ -183,7 +183,12 @@ def gsm_inspect(proxy, dump_private): print "Error reading signal quality: %s" % e print "Scanning..." - results = net.Scan(timeout=120) + try: + results = net.Scan(timeout=120) + except dbus.exceptions.DBusException, e: + print "Error scanning: %s" % e + results = {} + for r in results: status = r['status'] if status == "1":