Merge pull request #4407 from blueyed/sys-dunder

capture: do not overwrite `sys.__stdin__` etc
This commit is contained in:
Ronny Pfannschmidt 2018-11-22 07:26:06 +01:00 committed by GitHub
commit d894bf4535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -770,9 +770,9 @@ def _py36_windowsconsoleio_workaround(stream):
f.line_buffering,
)
sys.__stdin__ = sys.stdin = _reopen_stdio(sys.stdin, "rb")
sys.__stdout__ = sys.stdout = _reopen_stdio(sys.stdout, "wb")
sys.__stderr__ = sys.stderr = _reopen_stdio(sys.stderr, "wb")
sys.stdin = _reopen_stdio(sys.stdin, "rb")
sys.stdout = _reopen_stdio(sys.stdout, "wb")
sys.stderr = _reopen_stdio(sys.stderr, "wb")
def _attempt_to_close_capture_file(f):