Mercurial > hg
changeset 32152:994b0b1c77d6
py3: use encoding.unitolocal instead of .encode(encoding.encoding)
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 08 Apr 2017 11:02:37 +0530 |
parents | 4d504e541d3d |
children | 6f173560c7f4 |
files | mercurial/scmutil.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Wed May 03 10:43:59 2017 -0700 +++ b/mercurial/scmutil.py Sat Apr 08 11:02:37 2017 +0530 @@ -212,7 +212,7 @@ reason = inst.reason if isinstance(reason, unicode): # SSLError of Python 2.7.9 contains a unicode - reason = reason.encode(encoding.encoding, 'replace') + reason = encoding.unitolocal(reason) ui.warn(_("abort: error: %s\n") % reason) elif (util.safehasattr(inst, "args") and inst.args and inst.args[0] == errno.EPIPE):