From: Chris Lea Date: Fri, 29 Mar 2013 22:33:02 +0000 (-0700) Subject: add check for ssl.CertificateError X-Git-Tag: v3.0.1~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F704%2Fhead;p=thirdparty%2Ftornado.git add check for ssl.CertificateError --- diff --git a/tornado/netutil.py b/tornado/netutil.py index 5c2a7cf49..7b7d48dd6 100644 --- a/tornado/netutil.py +++ b/tornado/netutil.py @@ -321,7 +321,7 @@ def ssl_wrap_socket(socket, ssl_options, server_hostname=None, **kwargs): else: return ssl.wrap_socket(socket, **dict(context, **kwargs)) -if hasattr(ssl, 'match_hostname'): # python 3.2+ +if hasattr(ssl, 'match_hostname') and hasattr(ssl, 'CertificateError'): # python 3.2+ ssl_match_hostname = ssl.match_hostname SSLCertificateError = ssl.CertificateError else: