Show More
@@ -126,7 +126,11 b' if pycompat.ispy3:' | |||
|
126 | 126 | # a silly wrapper to make a bytes stream backed by a unicode one. |
|
127 | 127 | |
|
128 | 128 | # sys.stdin can be None |
|
129 | stdin = sys.stdin.buffer if sys.stdin else sys.stdin | |
|
129 | if sys.stdin: | |
|
130 | stdin = sys.stdin.buffer | |
|
131 | else: | |
|
132 | stdin = open(os.devnull, 'rb') | |
|
133 | os.close(stdin.fileno()) | |
|
130 | 134 | stdout = _make_write_all(sys.stdout.buffer) |
|
131 | 135 | stderr = _make_write_all(sys.stderr.buffer) |
|
132 | 136 | if pycompat.iswindows: |
General Comments 0
You need to be logged in to leave comments.
Login now