Return True from StreamReader.eof_received() to fix · python/asyncio@ce3ad81 (original) (raw)
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -240,6 +240,7 @@ def data_received(self, data): | ||
240 | 240 | |
241 | 241 | def eof_received(self): |
242 | 242 | self._stream_reader.feed_eof() |
243 | +return True | |
243 | 244 | |
244 | 245 | |
245 | 246 | class StreamWriter: |
@@ -321,6 +322,24 @@ def __init__(self, limit=_DEFAULT_LIMIT, loop=None): | ||
321 | 322 | self._transport = None |
322 | 323 | self._paused = False |
323 | 324 | |
325 | +def __repr__(self): | |
326 | +info = ['StreamReader'] | |
327 | +if self._buffer: | |
328 | +info.append('%d bytes' % len(info)) | |
329 | +if self._eof: | |
330 | +info.append('eof') | |
331 | +if self._limit != _DEFAULT_LIMIT: | |
332 | +info.append('l=%d' % self._limit) | |
333 | +if self._waiter: | |
334 | +info.append('w=%r' % self._waiter) | |
335 | +if self._exception: | |
336 | +info.append('e=%r' % self._exception) | |
337 | +if self._transport: | |
338 | +info.append('t=%r' % self._transport) | |
339 | +if self._paused: | |
340 | +info.append('paused') | |
341 | +return '<%s>' % ' '.join(info) | |
342 | + | |
324 | 343 | def exception(self): |
325 | 344 | return self._exception |
326 | 345 |