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
|
package = None
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
server_address = ('cppcheck.osuosl.org', 8000)
|
server_address = ('cppcheck.osuosl.org', 8000)
|
||||||
sock.connect(server_address)
|
|
||||||
try:
|
try:
|
||||||
|
sock.connect(server_address)
|
||||||
sock.send(b'get\n')
|
sock.send(b'get\n')
|
||||||
package = sock.recv(256)
|
package = sock.recv(256)
|
||||||
except socket.error:
|
except socket.error:
|
||||||
|
|
Loading…
Reference in New Issue