summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorNikolay Kim <fafhrd91@gmail.com>2017-03-12 19:23:30 (GMT)
committerYury Selivanov <yselivanov@gmail.com>2017-03-12 19:23:30 (GMT)
commit2b27e2e6a35c3d3e369612b984017fe0d1bfcf0c (patch)
tree411f91bc286d5ea19c8e380fcd4a3e74bb4e706a /Lib/asyncio
parent783d0c1a1c723733adcdf4249240246fc35a5bcb (diff)
downloadcpython-2b27e2e6a35c3d3e369612b984017fe0d1bfcf0c.zip
cpython-2b27e2e6a35c3d3e369612b984017fe0d1bfcf0c.tar.gz
cpython-2b27e2e6a35c3d3e369612b984017fe0d1bfcf0c.tar.bz2
bpo-29742: asyncio get_extra_info() throws exception (#525)
Diffstat (limited to 'Lib/asyncio')
-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: