From a595b89eb916d3fd12f4148917447b9e5da7ba05 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Fri, 15 May 2015 10:53:43 -0500 Subject: [PATCH] python24 travis issue diagnosis attempt --- speedtest_cli.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/speedtest_cli.py b/speedtest_cli.py index a37014b..f323c36 100755 --- a/speedtest_cli.py +++ b/speedtest_cli.py @@ -396,7 +396,7 @@ def getConfig(): 'times': root.find('times').attrib, 'download': root.find('download').attrib, 'upload': root.find('upload').attrib} - except AttributeError: # Python3 branch + except AttributeError: # Python2.4 branch root = DOM.parseString(''.join(configxml)) config = { 'client': getAttributesByTagName(root, 'client'), @@ -442,12 +442,13 @@ def closestServers(client, all=False): try: root = ET.fromstring(''.encode().join(serversxml)) elements = root.getiterator('server') - except AttributeError, e: # Python3 branch + except AttributeError: # Python2.4 branch try: root = DOM.parseString(''.join(serversxml)) elements = root.getElementsByTagName('server') except: - raise e + print_('---%s---' % serversxml) + print_('---%s---' % ''.join(serversxml)) except SyntaxError: raise SpeedtestCliServerListError for server in elements: