donate-cpu: try to catch socket.error better
This commit is contained in:
parent
58b3d75b62
commit
cba87f913e
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue