summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 1a4d418..14b4843 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -301,7 +301,12 @@ class _UnixReadPipeTransport(transports.ReadTransport):
self._loop.call_soon(waiter._set_result_unless_cancelled, None)
def __repr__(self):
- info = [self.__class__.__name__, 'fd=%s' % self._fileno]
+ info = [self.__class__.__name__]
+ if self._pipe is None:
+ info.append('closed')
+ elif self._closing:
+ info.append('closing')
+ info.append('fd=%s' % self._fileno)
if self._pipe is not None:
polling = selector_events._test_selector_event(
self._loop._selector,
@@ -404,7 +409,12 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
self._loop.call_soon(waiter._set_result_unless_cancelled, None)
def __repr__(self):
- info = [self.__class__.__name__, 'fd=%s' % self._fileno]
+ info = [self.__class__.__name__]
+ if self._pipe is None:
+ info.append('closed')
+ elif self._closing:
+ info.append('closing')
+ info.append('fd=%s' % self._fileno)
if self._pipe is not None:
polling = selector_events._test_selector_event(
self._loop._selector,