Skip to content
Myr

Use readline() on 2.x for fixup stream.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent aa752fd · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:click/_compat.py+5 added
82 unmodified lines
83 def read1(self, size):84 f = getattr(self._stream, 'read1', None)85 if f is not None:86 return f(size)87 # Only python 2 we dispatch to readline instead of read as we88 # do not want cause problems with the different implementation89 # of line buffering.90 if PY2:91 return self._stream.readline(size)92 return self._stream.read(size)9394 def readable(self):95 x = getattr(self._stream, 'readable', None)
430 unmodified lines