From 79fd962652a60f04ecc7becb116c330063b1706e Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 27 Mar 2015 15:20:08 +0100 Subject: asyncio: Fix _SelectorTransport.__repr__() if the event loop is closed --- Lib/asyncio/selector_events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/asyncio/selector_events.py') 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: -- cgit v1.2.3