Skip to content
Myr

Do not fail on missing flush

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 2fae192 · Browse files · 1 file+4 added−1 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+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:click/_compat.py+4 added-1 removed
48 unmodified lines
49 # it to look like python 2 stuff.50 if PY2:51 def write(self, x):52 if isinstance(x, str) or is_bytes(x):53 try:53 self.flush()54 self.flush()55 except Exception:56 pass57 return self.buffer.write(str(x))58 return io.TextIOWrapper.write(self, x)5960 def writelines(self, lines):
460 unmodified lines