Skip to content

Commit

Permalink
Make sure to also catch socket.error. Fixes #87
Browse files Browse the repository at this point in the history
  • Loading branch information
sivel committed Jul 29, 2014
1 parent 759ef15 commit 6c8dd05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion speedtest_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def getBestServer(servers):
h.request("GET", urlparts[2])
r = h.getresponse()
total = (timeit.default_timer() - start)
except (HTTPError, URLError):
except (HTTPError, URLError, socket.error):
cum.append(3600)
continue
text = r.read(9)
Expand Down

0 comments on commit 6c8dd05

Please sign in to comment.