# HG changeset patch # User Gregory Szorc # Date 2020-04-20 00:26:52 # Node ID 380959c6f75e6fabc0300e0780be313b9b38400f # Parent 1b80e684813be5d27999ed1b871a403e5fb3b2f8 setup: use sysstr() on process output Otherwise we get a str-bytes mismatch on Python 3 if an error occurs. Differential Revision: https://phab.mercurial-scm.org/D8469 diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -890,7 +890,8 @@ class hgbuilddoc(Command): ) if res: raise SystemExit( - 'error running gendoc.py: %s' % '\n'.join([out, err]) + 'error running gendoc.py: %s' + % '\n'.join([sysstr(out), sysstr(err)]) ) with open(txt, 'wb') as fh: @@ -907,7 +908,8 @@ class hgbuilddoc(Command): ) if res: raise SystemExit( - 'error running gendoc: %s' % '\n'.join([out, err]) + 'error running gendoc: %s' + % '\n'.join([sysstr(out), sysstr(err)]) ) with open(gendoc, 'wb') as fh: @@ -932,7 +934,8 @@ class hgbuilddoc(Command): ) if res: raise SystemExit( - 'error running runrst: %s' % '\n'.join([out, err]) + 'error running runrst: %s' + % '\n'.join([sysstr(out), sysstr(err)]) ) normalizecrlf('doc/%s' % root) @@ -957,7 +960,8 @@ class hgbuilddoc(Command): ) if res: raise SystemExit( - 'error running runrst: %s' % '\n'.join([out, err]) + 'error running runrst: %s' + % '\n'.join([sysstr(out), sysstr(err)]) ) normalizecrlf('doc/%s.html' % root)