Browse Source

fix socket.error problem

1.4
clowwindy 13 years ago
parent
commit
00b2ce3e2e
  1. 2
      local.py
  2. 2
      server.py

2
local.py

@ -54,7 +54,7 @@ def socket_create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
sock.connect(sa) sock.connect(sa)
return sock return sock
except error as _: except socket.error as _:
err = _ err = _
if sock is not None: if sock is not None:
sock.close() sock.close()

2
server.py

@ -57,7 +57,7 @@ def socket_create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
sock.connect(sa) sock.connect(sa)
return sock return sock
except error as _: except socket.error as _:
err = _ err = _
if sock is not None: if sock is not None:
sock.close() sock.close()

Loading…
Cancel
Save