python24 travis issue diagnosis attempt

This commit is contained in:
Matt Martz 2015-05-15 10:34:52 -05:00
parent 51d0d88b96
commit 6366a8a172
2 changed files with 6 additions and 12 deletions

View File

@ -5,15 +5,6 @@ python:
env:
- TOXENV=py24
- TOXENV=py25
- TOXENV=py26
- TOXENV=py27
- TOXENV=py31
- TOXENV=py32
- TOXENV=py33
- TOXENV=py34
- TOXENV=pypy
- TOXENV=flake8
before_install:
- if [[ $(echo "$TOXENV" | egrep -c "(py2[45]|py3[14])") != 0 ]]; then sudo add-apt-repository -y ppa:fkrull/deadsnakes; fi;

View File

@ -442,9 +442,12 @@ def closestServers(client, all=False):
try:
root = ET.fromstring(''.encode().join(serversxml))
elements = root.getiterator('server')
except AttributeError: # Python3 branch
except AttributeError, e: # Python3 branch
try:
root = DOM.parseString(''.join(serversxml))
elements = root.getElementsByTagName('server')
except:
raise e
except SyntaxError:
raise SpeedtestCliServerListError
for server in elements: