Restored the selection of the best server for searching by name

This commit is contained in:
Alexandr K 2017-05-13 20:22:51 +03:00
parent a0ccd6a166
commit f72c77ee1b
1 changed files with 1 additions and 5 deletions

View File

@ -1432,14 +1432,10 @@ def shell():
print_('Cannot retrieve speedtest server list')
raise SpeedtestCLIError(get_exception())
for _, items in sorted(speedtest.servers.items()):
for _, items in speedtest.servers.items():
for server in items:
if (server['name'].lower() == args.server.lower()):
servers.append(int(server['id']))
break
else:
continue
break
if not servers:
raise SpeedtestCLIError('Server was not found: '