Mercurial > hg
comparison mercurial/util.py @ 30988:d194f0dba7ac
py3: convert the mode argument of os.fdopen to unicodes
Couple of these from the earlier series got lost while rebasing. So this patch
converts them again.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 16 Feb 2017 17:30:35 +0530 |
parents | 22fbca1d11ed |
children | 2912b06905dc |
comparison
equal
deleted
inserted
replaced
30987:1ee685defe80 | 30988:d194f0dba7ac |
---|---|
71 | 71 |
72 # glibc determines buffering on first write to stdout - if we replace a TTY | 72 # glibc determines buffering on first write to stdout - if we replace a TTY |
73 # destined stdout with a pipe destined stdout (e.g. pager), we want line | 73 # destined stdout with a pipe destined stdout (e.g. pager), we want line |
74 # buffering | 74 # buffering |
75 if isatty(stdout): | 75 if isatty(stdout): |
76 stdout = os.fdopen(stdout.fileno(), 'wb', 1) | 76 stdout = os.fdopen(stdout.fileno(), pycompat.sysstr('wb'), 1) |
77 | 77 |
78 if pycompat.osname == 'nt': | 78 if pycompat.osname == 'nt': |
79 from . import windows as platform | 79 from . import windows as platform |
80 stdout = platform.winstdout(stdout) | 80 stdout = platform.winstdout(stdout) |
81 else: | 81 else: |