From 6c8dd0587227cb73aeee0ad7297b51e2cc02a196 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 29 Jul 2014 17:14:41 -0500 Subject: [PATCH] Make sure to also catch socket.error. Fixes #87 --- speedtest_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speedtest_cli.py b/speedtest_cli.py index 1a46bed..e65a9a3 100755 --- a/speedtest_cli.py +++ b/speedtest_cli.py @@ -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)