aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-27 15:20:08 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-03-27 15:20:08 +0100
commit79fd962652a60f04ecc7becb116c330063b1706e (patch)
treee5caad3b0248b10d4f1f7be634027f2ff778d247 /Lib/asyncio/selector_events.py
parent0b4e355b8e7729d1e3a67da8539b3701f4e546ff (diff)
downloadcpython-79fd962652a60f04ecc7becb116c330063b1706e.tar.gz
cpython-79fd962652a60f04ecc7becb116c330063b1706e.zip
asyncio: Fix _SelectorTransport.__repr__() if the event loop is closed
Diffstat (limited to 'Lib/asyncio/selector_events.py')
-rw-r--r--Lib/asyncio/selector_events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index a38ed1cee3b..68e9415e6a9 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -535,7 +535,7 @@ class _SelectorTransport(transports._FlowControlMixin,
info.append('closing')
info.append('fd=%s' % self._sock_fd)
# test if the transport was closed
- if self._loop is not None:
+ if self._loop is not None and not self._loop.is_closed():
polling = _test_selector_event(self._loop._selector,
self._sock_fd, selectors.EVENT_READ)
if polling: