Don't continu elooping if the request is successful
This commit is contained in:
parent
3ee45cace8
commit
3cc06168f5
|
@ -429,6 +429,10 @@ def closestServers(client, all=False):
|
||||||
except SpeedtestCliServerListError:
|
except SpeedtestCliServerListError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# We were able to fetch and parse the list of speedtest.net servers
|
||||||
|
if servers:
|
||||||
|
break
|
||||||
|
|
||||||
if not servers:
|
if not servers:
|
||||||
print_('Failed to retrieve list of speedtest.net servers')
|
print_('Failed to retrieve list of speedtest.net servers')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in New Issue