changeset 31448 | 6419cd243017 |
parent 31447 | 067add650129 |
child 32181 | b98ee1a808bd |
--- a/mercurial/extensions.py Mon Mar 13 09:11:08 2017 -0700 +++ b/mercurial/extensions.py Mon Mar 13 09:12:56 2017 -0700 @@ -108,9 +108,7 @@ def _forbytes(inst): """Portably format an import error into a form suitable for %-formatting into bytestrings.""" - if pycompat.ispy3: - return encoding.unitolocal(str(inst)) - return inst + return encoding.strtolocal(str(inst)) def _reportimporterror(ui, err, failed, next): # note: this ui.debug happens before --debug is processed,