From d5eff70b6e7acb3bd60a5e6f8233cf4936a5d606 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 7 Mar 2015 01:31:31 +0100 Subject: fix tests on Windows --- netlib/tcp.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'netlib/tcp.py') diff --git a/netlib/tcp.py b/netlib/tcp.py index ba4f008c..b2f11851 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -7,6 +7,7 @@ import threading import time import traceback from OpenSSL import SSL +import OpenSSL from . import certutils @@ -301,6 +302,10 @@ class _Connection(object): self.connection.shutdown() except SSL.Error: pass + except KeyError as e: + # Workaround for https://github.com/pyca/pyopenssl/pull/183 + if OpenSSL.__version__ != "0.14": + raise e """ Creates an SSL Context. -- cgit v1.2.3