Submitter | phabricator |
---|---|
Date | Dec. 2, 2020, 6:08 p.m. |
Message ID | <differential-rev-PHID-DREV-dymnop6n46ynhnb5uheu-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/47782/ |
State | Superseded |
Headers | show |
Comments
Patch
diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py +++ b/mercurial/utils/procutil.py @@ -124,7 +124,9 @@ # Python 3 implements its own I/O streams. # TODO: .buffer might not exist if std streams were replaced; we'll need # a silly wrapper to make a bytes stream backed by a unicode one. - stdin = sys.stdin.buffer + + # sys.stdin can be None + stdin = sys.stdin.buffer if sys.stdin else sys.stdin stdout = _make_write_all(sys.stdout.buffer) stderr = _make_write_all(sys.stderr.buffer) if pycompat.iswindows: