From cba87f913e74fd0866414bf011bb3c6013d9afdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 20 Nov 2018 11:18:18 +0100 Subject: [PATCH] donate-cpu: try to catch socket.error better --- tools/donate-cpu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/donate-cpu.py b/tools/donate-cpu.py index 81ef0ac04..45fb02451 100644 --- a/tools/donate-cpu.py +++ b/tools/donate-cpu.py @@ -92,8 +92,8 @@ def getPackage(): package = None sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_address = ('cppcheck.osuosl.org', 8000) - sock.connect(server_address) try: + sock.connect(server_address) sock.send(b'get\n') package = sock.recv(256) except socket.error: