diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 16:50:41 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 16:50:41 +0100 |
commit | e1eb834ee239ec54998a0b5174e1f0ea33bc4ece (patch) | |
tree | 3f4164a3760468192bf878c17b2f9936798a5aea | |
parent | 5d03db872a37bd1122d76a75eafd3d59456d2ea1 (diff) | |
download | trollius-e1eb834ee239ec54998a0b5174e1f0ea33bc4ece.tar.gz |
Cleanup sslproto.py
-rw-r--r-- | asyncio/sslproto.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/asyncio/sslproto.py b/asyncio/sslproto.py index 987c158..dc03cf5 100644 --- a/asyncio/sslproto.py +++ b/asyncio/sslproto.py @@ -530,10 +530,11 @@ class SSLProtocol(protocols.Protocol): self._in_handshake = False sslobj = self._sslpipe.ssl_object - peercert = None if handshake_exc else sslobj.getpeercert() try: if handshake_exc is not None: raise handshake_exc + + peercert = sslobj.getpeercert() if not hasattr(self._sslcontext, 'check_hostname'): # Verify hostname if requested, Python 3.4+ uses check_hostname # and checks the hostname in do_handshake() |