python24 travis issue diagnosis attempt
This commit is contained in:
parent
6366a8a172
commit
a595b89eb9
|
@ -396,7 +396,7 @@ def getConfig():
|
||||||
'times': root.find('times').attrib,
|
'times': root.find('times').attrib,
|
||||||
'download': root.find('download').attrib,
|
'download': root.find('download').attrib,
|
||||||
'upload': root.find('upload').attrib}
|
'upload': root.find('upload').attrib}
|
||||||
except AttributeError: # Python3 branch
|
except AttributeError: # Python2.4 branch
|
||||||
root = DOM.parseString(''.join(configxml))
|
root = DOM.parseString(''.join(configxml))
|
||||||
config = {
|
config = {
|
||||||
'client': getAttributesByTagName(root, 'client'),
|
'client': getAttributesByTagName(root, 'client'),
|
||||||
|
@ -442,12 +442,13 @@ def closestServers(client, all=False):
|
||||||
try:
|
try:
|
||||||
root = ET.fromstring(''.encode().join(serversxml))
|
root = ET.fromstring(''.encode().join(serversxml))
|
||||||
elements = root.getiterator('server')
|
elements = root.getiterator('server')
|
||||||
except AttributeError, e: # Python3 branch
|
except AttributeError: # Python2.4 branch
|
||||||
try:
|
try:
|
||||||
root = DOM.parseString(''.join(serversxml))
|
root = DOM.parseString(''.join(serversxml))
|
||||||
elements = root.getElementsByTagName('server')
|
elements = root.getElementsByTagName('server')
|
||||||
except:
|
except:
|
||||||
raise e
|
print_('---%s---' % serversxml)
|
||||||
|
print_('---%s---' % ''.join(serversxml))
|
||||||
except SyntaxError:
|
except SyntaxError:
|
||||||
raise SpeedtestCliServerListError
|
raise SpeedtestCliServerListError
|
||||||
for server in elements:
|
for server in elements:
|
||||||
|
|
Loading…
Reference in New Issue