Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

Commit e8af1e92 authored by Manuel Jacob's avatar Manuel Jacob
Browse files

procutil: move assignments

This should probably be part of the previous patch, but folding it results in a
less useful word diff, so I decided to keep it separate for review.
parent 63196198dbf0
......@@ -86,15 +86,14 @@ if pycompat.ispy3:
# a silly wrapper to make a bytes stream backed by a unicode one.
stdin = sys.stdin.buffer
stdout = sys.stdout.buffer
stderr = sys.stderr.buffer
if isatty(stdout):
# The standard library doesn't offer line-buffered binary streams.
stdout = make_line_buffered(stdout)
stderr = sys.stderr.buffer
# Python 2 uses the I/O streams provided by the C library.
stdin = sys.stdin
stdout = sys.stdout
stderr = sys.stderr
if isatty(stdout):
if pycompat.iswindows:
# Work around size limit when writing to console.
......@@ -106,6 +105,7 @@ else:
# replace a TTY destined stdout with a pipe destined stdout (e.g.
# pager), we want line buffering.
stdout = os.fdopen(stdout.fileno(), 'wb', 1)
stderr = sys.stderr
findexe = platform.findexe
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment