Also catch URLError when trying to fetch latency.txt. Fixes #41
This commit is contained in:
parent
756f04da76
commit
6d777db198
|
@ -391,7 +391,7 @@ def getBestServer(servers):
|
||||||
for i in range(0, 3):
|
for i in range(0, 3):
|
||||||
try:
|
try:
|
||||||
uh = urlopen('%s/latency.txt' % url)
|
uh = urlopen('%s/latency.txt' % url)
|
||||||
except HTTPError:
|
except (HTTPError, URLError):
|
||||||
cum.append(3600)
|
cum.append(3600)
|
||||||
continue
|
continue
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
|
Loading…
Reference in New Issue