Skip to content
Myr

Merge pull request #32 from pfmoore/open_fix

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

Fix Python 3 issue with errors arg on binary open_stream

authored by Armin Ronacher · committed by Armin Ronacher · parents 6904fac, e7f6b38 · Browse files · 1 file+3 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+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:click.py+3 added-1 removed
51 unmodified lines
52 raw_input = input5354 def open_stream(filename, mode='r', encoding=None, errors='strict'):55 if filename != '-':56 if encoding is not None:56 return open(filename, mode, encoding=encoding, errors=errors), True57 return open(filename, mode, encoding=encoding, errors=errors), True58 return open(filename, mode), True59 if 'w' in mode:60 f = sys.stdout61 if encoding is not None or 'b' in mode:62 f = f.buffer.raw
1610 unmodified lines