Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/webutil.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 | 44a519ec5077 |
children | 1fb9e01328e4 |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Sat Feb 17 01:09:56 2018 -0500 +++ b/mercurial/hgweb/webutil.py Sat Feb 17 01:11:48 2018 -0500 @@ -347,7 +347,7 @@ try: return util.processlinerange(fromline, toline) except error.ParseError as exc: - raise ErrorResponse(HTTP_BAD_REQUEST, str(exc)) + raise ErrorResponse(HTTP_BAD_REQUEST, pycompat.bytestr(exc)) def formatlinerange(fromline, toline): return '%d:%d' % (fromline + 1, toline)