Shorten a line to pass pep8
This commit is contained in:
parent
f3bdb7257c
commit
5ed261b33d
|
@ -197,9 +197,10 @@ def closestServers(client):
|
||||||
root = DOM.parseString(serversxml)
|
root = DOM.parseString(serversxml)
|
||||||
servers = {}
|
servers = {}
|
||||||
for server in root.getElementsByTagName('server'):
|
for server in root.getElementsByTagName('server'):
|
||||||
|
attrib = dict(server.attributes.items())
|
||||||
d = distance([float(client['lat']), float(client['lon'])],
|
d = distance([float(client['lat']), float(client['lon'])],
|
||||||
[float(server.getAttribute('lat')), float(server.getAttribute('lon'))])
|
[float(attrib.get('lat')), float(attrib.get('lon'))])
|
||||||
servers[d] = dict(server.attributes.items())
|
servers[d] = attrib
|
||||||
|
|
||||||
closest = []
|
closest = []
|
||||||
for d in sorted(servers.keys())[0:4]:
|
for d in sorted(servers.keys())[0:4]:
|
||||||
|
|
Loading…
Reference in New Issue