From 476738d2732956356e1c00b6b0abc414a9dde7de Mon Sep 17 00:00:00 2001 From: clowwindy Date: Mon, 2 Jun 2014 18:16:24 +0800 Subject: [PATCH] fix errno --- shadowsocks/eventloop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shadowsocks/eventloop.py b/shadowsocks/eventloop.py index b6a9ca5..d75905d 100644 --- a/shadowsocks/eventloop.py +++ b/shadowsocks/eventloop.py @@ -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))