mirror of
https://github.com/sivel/speedtest-cli.git
synced 2026-08-03 22:29:08 +00:00
Shorten a line to pass pep8
This commit is contained in:
parent
f3bdb7257c
commit
5ed261b33d
1 changed files with 3 additions and 2 deletions
|
|
@ -197,9 +197,10 @@ def closestServers(client):
|
|||
root = DOM.parseString(serversxml)
|
||||
servers = {}
|
||||
for server in root.getElementsByTagName('server'):
|
||||
attrib = dict(server.attributes.items())
|
||||
d = distance([float(client['lat']), float(client['lon'])],
|
||||
[float(server.getAttribute('lat')), float(server.getAttribute('lon'))])
|
||||
servers[d] = dict(server.attributes.items())
|
||||
[float(attrib.get('lat')), float(attrib.get('lon'))])
|
||||
servers[d] = attrib
|
||||
|
||||
closest = []
|
||||
for d in sorted(servers.keys())[0:4]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue