summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-05-13 20:05:05 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2016-05-13 20:05:05 (GMT)
commit2e413f7cc7d54f2af77b0242605cf3c8adc26a6f (patch)
tree11e326fdcaaa8199a853fb37dfdf53afdf1d5ab9 /Lib/asyncio
parent8308db5cd56f0a3ec33759bf482563be37bcd648 (diff)
parent5dc093336f6f6c7bd0b79c1c870dc9b733fc2fe5 (diff)
downloadcpython-2e413f7cc7d54f2af77b0242605cf3c8adc26a6f.zip
cpython-2e413f7cc7d54f2af77b0242605cf3c8adc26a6f.tar.gz
cpython-2e413f7cc7d54f2af77b0242605cf3c8adc26a6f.tar.bz2
Merge 3.5 (asyncio)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/unix_events.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index aad1068..666706f 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -329,14 +329,17 @@ class _UnixReadPipeTransport(transports.ReadTransport):
elif self._closing:
info.append('closing')
info.append('fd=%s' % self._fileno)
- if self._pipe is not None:
+ selector = getattr(self._loop, '_selector', None)
+ if self._pipe is not None and selector is not None:
polling = selector_events._test_selector_event(
- self._loop._selector,
+ selector,
self._fileno, selectors.EVENT_READ)
if polling:
info.append('polling')
else:
info.append('idle')
+ elif self._pipe is not None:
+ info.append('open')
else:
info.append('closed')
return '<%s>' % ' '.join(info)
@@ -454,9 +457,10 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
elif self._closing:
info.append('closing')
info.append('fd=%s' % self._fileno)
- if self._pipe is not None:
+ selector = getattr(self._loop, '_selector', None)
+ if self._pipe is not None and selector is not None:
polling = selector_events._test_selector_event(
- self._loop._selector,
+ selector,
self._fileno, selectors.EVENT_WRITE)
if polling:
info.append('polling')
@@ -465,6 +469,8 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
bufsize = self.get_write_buffer_size()
info.append('bufsize=%s' % bufsize)
+ elif self._pipe is not None:
+ info.append('open')
else:
info.append('closed')
return '<%s>' % ' '.join(info)