Mercurial > hg
diff mercurial/templater.py @ 34808:e87e62b7fc0b
templater: don't blow up when trying to build an abort message
__name__ is unicode, but we need bytes. For now, we'll make the
(mostly-safe) assumption that template filter names will be ascii.
Differential Revision: https://phab.mercurial-scm.org/D1137
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 16 Oct 2017 22:50:39 -0400 |
parents | b13c95919ff5 |
children | d3ea6a1c798f |
line wrap: on
line diff
--- a/mercurial/templater.py Mon Oct 16 22:44:06 2017 -0400 +++ b/mercurial/templater.py Mon Oct 16 22:50:39 2017 -0400 @@ -427,7 +427,7 @@ sym = findsymbolicname(arg) if sym: msg = (_("template filter '%s' is not compatible with keyword '%s'") - % (filt.__name__, sym)) + % (filt.__name__.encode('ascii'), sym)) else: msg = _("incompatible use of template filter '%s'") % filt.__name__ raise error.Abort(msg)