summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/sslproto.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@gmail.com>2017-03-12 21:06:04 (GMT)
committerGitHub <noreply@github.com>2017-03-12 21:06:04 (GMT)
commitdb522dc86294a99f46a63cd5b54c7c4ab8017c96 (patch)
tree4df44dd8cdd2080fa614976f7ffe9e86137e06fa /Lib/asyncio/sslproto.py
parent216803d8e10615c769571fbfbd1f341557f25a14 (diff)
downloadcpython-db522dc86294a99f46a63cd5b54c7c4ab8017c96.zip
cpython-db522dc86294a99f46a63cd5b54c7c4ab8017c96.tar.gz
cpython-db522dc86294a99f46a63cd5b54c7c4ab8017c96.tar.bz2
bpo-29742: asyncio get_extra_info() throws exception (#525) (#646)
Diffstat (limited to 'Lib/asyncio/sslproto.py')
-rw-r--r--Lib/asyncio/sslproto.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
index c2c4b95..aa5e034 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -542,8 +542,10 @@ class SSLProtocol(protocols.Protocol):
def _get_extra_info(self, name, default=None):
if name in self._extra:
return self._extra[name]
- else:
+ elif self._transport is not None:
return self._transport.get_extra_info(name, default)
+ else:
+ return default
def _start_shutdown(self):
if self._in_shutdown: