From 56c4e9c7c18a7efea6f844f5616962f50c52d8ff Mon Sep 17 00:00:00 2001 From: liris Date: Thu, 16 Apr 2015 11:01:06 +0900 Subject: [PATCH] fix version check --- websocket/_http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket/_http.py b/websocket/_http.py index 477cfe0..989c8bc 100644 --- a/websocket/_http.py +++ b/websocket/_http.py @@ -119,7 +119,7 @@ def _open_socket(addrinfo_list, sockopt, timeout): def _can_use_sni(): - return sys.version_info[2] >= 9 or (six.PY3 and sys.version_info[2] >= 2) + return (six.Py2 and sys.version_info[1] >= 7 and sys.version_info[2] >= 9) or (six.PY3 and sys.version_info[2] >= 2) def _wrap_sni_socket(sock, sslopt, hostname):