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 1e9523e7 authored by Manuel Jacob's avatar Manuel Jacob
Browse files

procutil: split if condition

This prepares the code for subsequent changes where we need to differentiate
between the two cases.
parent 8628cd1122d2
......@@ -98,9 +98,11 @@ if pycompat.iswindows:
# destined stdout with a pipe destined stdout (e.g. pager), we want line
# buffering.
if isatty(stdout):
if pycompat.ispy3 or pycompat.iswindows:
if pycompat.ispy3:
# Python 3 implements its own I/O streams.
# The standard library doesn't offer line-buffered binary streams.
stdout = make_line_buffered(stdout)
elif pycompat.iswindows:
# Python 2 uses the I/O streams provided by the C library.
# The Windows C runtime library doesn't support line buffering.
stdout = make_line_buffered(stdout)
......
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