summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/sslproto.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@gmail.com>2017-03-12 21:06:16 (GMT)
committerGitHub <noreply@github.com>2017-03-12 21:06:16 (GMT)
commit99f8d33a94c8951fd6b2d5f079d20be698150993 (patch)
tree7acd7af9e67bb75ab3c1458464bc8305d71dcb6b /Lib/asyncio/sslproto.py
parentfa448de97de85d242491d7ad259ade0732f05db8 (diff)
downloadcpython-99f8d33a94c8951fd6b2d5f079d20be698150993.zip
cpython-99f8d33a94c8951fd6b2d5f079d20be698150993.tar.gz
cpython-99f8d33a94c8951fd6b2d5f079d20be698150993.tar.bz2
bpo-29742: asyncio get_extra_info() throws exception (#525) (#645)
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 7ad28d6..ab7ff0b 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -543,8 +543,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: