Mercurial > public > mercurial-scm > hg
diff mercurial/wireprotoserver.py @ 36258:af0a19d8812b
py3: get bytes-repr of network errors portably
This resolves a lot of weird issues in Python 3 around error strings.
Differential Revision: https://phab.mercurial-scm.org/D2295
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 17 Feb 2018 01:11:48 -0500 |
parents | 72812ad205d1 |
children | 685bcdd236b5 |
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py Sat Feb 17 01:09:56 2018 -0500 +++ b/mercurial/wireprotoserver.py Sat Feb 17 01:11:48 2018 -0500 @@ -339,7 +339,7 @@ # TODO This response body assumes the failed command was # "unbundle." That assumption is not always valid. - req.respond(e, HGTYPE, body='0\n%s\n' % e) + req.respond(e, HGTYPE, body='0\n%s\n' % pycompat.bytestr(e)) return ''