Mercurial > public > mercurial-scm > hg
diff mercurial/scmutil.py @ 36422:04c319a07c7b
py3: hunt down str(exception) instances and use util.forcebytestr
I decided to grep around for \sstr\( and see what low-hanging fruit
that showed me. This was part of that hunt. That grep pattern still
has some things worth exploring.
Differential Revision: https://phab.mercurial-scm.org/D2440
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 25 Feb 2018 23:08:41 -0500 |
parents | ddd9474d2e08 |
children | bb5f5c1c3c1b |
line wrap: on
line diff
--- a/mercurial/scmutil.py Sun Feb 25 22:30:14 2018 -0500 +++ b/mercurial/scmutil.py Sun Feb 25 23:08:41 2018 -0500 @@ -208,7 +208,7 @@ ui.warn(_("(%s)\n") % inst.hint) except ImportError as inst: ui.warn(_("abort: %s!\n") % inst) - m = str(inst).split()[-1] + m = util.forcebytestr(inst).split()[-1] if m in "mpatch bdiff".split(): ui.warn(_("(did you forget to compile extensions?)\n")) elif m in "zlib".split():