Mercurial > hg
comparison mercurial/ui.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 | ddeb7653b31c |
children | c6061cadb400 |
comparison
equal
deleted
inserted
replaced
36421:1df7e7b8558e | 36422:04c319a07c7b |
---|---|
364 cfg.read(filename, fp, sections=sections, remap=remap) | 364 cfg.read(filename, fp, sections=sections, remap=remap) |
365 fp.close() | 365 fp.close() |
366 except error.ConfigError as inst: | 366 except error.ConfigError as inst: |
367 if trusted: | 367 if trusted: |
368 raise | 368 raise |
369 self.warn(_("ignored: %s\n") % str(inst)) | 369 self.warn(_("ignored: %s\n") % util.forcebytestr(inst)) |
370 | 370 |
371 if self.plain(): | 371 if self.plain(): |
372 for k in ('debug', 'fallbackencoding', 'quiet', 'slash', | 372 for k in ('debug', 'fallbackencoding', 'quiet', 'slash', |
373 'logtemplate', 'statuscopies', 'style', | 373 'logtemplate', 'statuscopies', 'style', |
374 'traceback', 'verbose'): | 374 'traceback', 'verbose'): |