diff options
| author | David Lord <davidism@gmail.com> | 2018-09-13 12:51:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-13 12:51:41 -0700 |
| commit | 16792fe4d402fde830cbc5655e429a57f11b3d38 (patch) | |
| tree | 67b92ae98a1e7684910ee1ad358c863a090a9038 | |
| parent | 2cd71bffc8cf21983a4cf15abe3bd1708ba27ad8 (diff) | |
| parent | dbd13dc17e2d791cbeabde43f799684a19b0d66f (diff) | |
| download | click-6.x-maintenance.tar.gz | |
Merge pull request #819 from segevfiner/winconsole-writer-bug-26.x-maintenance
A TextIOWrapper that wraps _winconsole._WindowsConsoleWriter expects a buffered stream
| -rw-r--r-- | click/_winconsole.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/click/_winconsole.py b/click/_winconsole.py index f1d5e28..d2ee8cb 100644 --- a/click/_winconsole.py +++ b/click/_winconsole.py @@ -210,14 +210,14 @@ def _get_text_stdin(buffer_stream): def _get_text_stdout(buffer_stream): text_stream = _NonClosingTextIOWrapper( - _WindowsConsoleWriter(STDOUT_HANDLE), + io.BufferedWriter(_WindowsConsoleWriter(STDOUT_HANDLE)), 'utf-16-le', 'strict', line_buffering=True) return ConsoleStream(text_stream, buffer_stream) def _get_text_stderr(buffer_stream): text_stream = _NonClosingTextIOWrapper( - _WindowsConsoleWriter(STDERR_HANDLE), + io.BufferedWriter(_WindowsConsoleWriter(STDERR_HANDLE)), 'utf-16-le', 'strict', line_buffering=True) return ConsoleStream(text_stream, buffer_stream) |
