# HG changeset patch # User Augie Fackler # Date 1508208639 14400 # Node ID e87e62b7fc0bf6debd4db89e3a902eafb97dcb98 # Parent 3caec3c032c893200d7116979a809d99dec1430b 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 diff -r 3caec3c032c8 -r e87e62b7fc0b mercurial/templater.py --- 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)