Show More
@@ -124,7 +124,9 b' if pycompat.ispy3:' | |||||
124 | # Python 3 implements its own I/O streams. |
|
124 | # Python 3 implements its own I/O streams. | |
125 | # TODO: .buffer might not exist if std streams were replaced; we'll need |
|
125 | # TODO: .buffer might not exist if std streams were replaced; we'll need | |
126 | # a silly wrapper to make a bytes stream backed by a unicode one. |
|
126 | # a silly wrapper to make a bytes stream backed by a unicode one. | |
127 | stdin = sys.stdin.buffer |
|
127 | ||
|
128 | # sys.stdin can be None | |||
|
129 | stdin = sys.stdin.buffer if sys.stdin else sys.stdin | |||
128 | stdout = _make_write_all(sys.stdout.buffer) |
|
130 | stdout = _make_write_all(sys.stdout.buffer) | |
129 | stderr = _make_write_all(sys.stderr.buffer) |
|
131 | stderr = _make_write_all(sys.stderr.buffer) | |
130 | if pycompat.iswindows: |
|
132 | if pycompat.iswindows: |
General Comments 0
You need to be logged in to leave comments.
Login now