fix errno
This commit is contained in:
parent
5d022e2828
commit
476738d273
1 changed files with 2 additions and 2 deletions
|
@ -230,5 +230,5 @@ def errno_from_exception(e):
|
|||
|
||||
# from tornado
|
||||
def get_sock_error(sock):
|
||||
errno = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
|
||||
return socket.error(errno, os.strerror(errno))
|
||||
error_number = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
|
||||
return socket.error(error_number, os.strerror(error_number))
|
||||
|
|
Loading…
Reference in a new issue