Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
36421:1df7e7b8558e | 36422:04c319a07c7b |
---|---|
206 ui.warn(_("abort: %s\n") % inst) | 206 ui.warn(_("abort: %s\n") % inst) |
207 if inst.hint: | 207 if inst.hint: |
208 ui.warn(_("(%s)\n") % inst.hint) | 208 ui.warn(_("(%s)\n") % inst.hint) |
209 except ImportError as inst: | 209 except ImportError as inst: |
210 ui.warn(_("abort: %s!\n") % inst) | 210 ui.warn(_("abort: %s!\n") % inst) |
211 m = str(inst).split()[-1] | 211 m = util.forcebytestr(inst).split()[-1] |
212 if m in "mpatch bdiff".split(): | 212 if m in "mpatch bdiff".split(): |
213 ui.warn(_("(did you forget to compile extensions?)\n")) | 213 ui.warn(_("(did you forget to compile extensions?)\n")) |
214 elif m in "zlib".split(): | 214 elif m in "zlib".split(): |
215 ui.warn(_("(is your Python install correct?)\n")) | 215 ui.warn(_("(is your Python install correct?)\n")) |
216 except IOError as inst: | 216 except IOError as inst: |