Skip to content
Myr

Fix Python 3 issue with errors arg on binary open_stream

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

authored by Paul Moore · committed by Paul Moore · parent 8ca33a9 · 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
50 unmodified lines
51 raw_input = input5253 def open_stream(filename, mode='r', encoding=None, errors='strict'):54 if filename != '-':55 if encoding is not None:55 return open(filename, mode, encoding=encoding, errors=errors), True56 return open(filename, mode, encoding=encoding, errors=errors), True57 return open(filename, mode), True58 if 'w' in mode:59 f = sys.stdout60 if encoding is not None or 'b' in mode:61 f = f.buffer.raw
1571 unmodified lines