Mercurial > hg-stable
changeset 40216:c17d73bf6a4d
py3: use sys.stdout.buffer for binary output in tests/svnxml.py
Just following 6c0b1d964537ab62d76c208f5f04ab414814c94e here.
Differential Revision: https://phab.mercurial-scm.org/D5027
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Sat, 13 Oct 2018 03:59:15 +0300 |
parents | 4d6019c0e0ef |
children | 6e7789064c21 |
files | tests/svnxml.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/svnxml.py Sat Oct 13 03:58:20 2018 +0300 +++ b/tests/svnxml.py Sat Oct 13 03:59:15 2018 +0300 @@ -35,7 +35,10 @@ return entries def printentries(entries): - fp = sys.stdout + try: + fp = sys.stdout.buffer + except AttributeError: + fp = sys.stdout for e in entries: for k in ('revision', 'author', 'msg'): fp.write(('%s: %s\n' % (k, e[k])).encode('utf-8'))