Mercurial > hg
changeset 43947:b4c82b704180 stable 5.2.2
py3: force bytestr conversion of "reason" in scmutil.callcatch()
For instance, reason may be an InvalidURL as shown in added test.
author | Denis Laxalde <denis@laxalde.org> |
---|---|
date | Wed, 18 Dec 2019 20:17:21 +0100 |
parents | b06cf2809ec3 |
children | 453c4f07de0f |
files | mercurial/scmutil.py tests/test-clone.t |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Tue Nov 19 23:19:57 2019 +0900 +++ b/mercurial/scmutil.py Wed Dec 18 20:17:21 2019 +0100 @@ -262,7 +262,7 @@ if isinstance(reason, pycompat.unicode): # SSLError of Python 2.7.9 contains a unicode reason = encoding.unitolocal(reason) - ui.error(_(b"abort: error: %s\n") % reason) + ui.error(_(b"abort: error: %s\n") % stringutil.forcebytestr(reason)) elif ( util.safehasattr(inst, b"args") and inst.args