# HG changeset patch # User Augie Fackler # Date 2017-10-17 14:51:43 # Node ID d3ea6a1c798faabcd4894adccc3dad4392c54993 # Parent 4fdc4adbc838e14516d3df8cd21f6212bf159d9a templater: use pycompat.sysbytes to bytes-ify some __name__ attrs Spotted by yuya in review of e87e62b7fc0b. Differential Revision: https://phab.mercurial-scm.org/D1145 diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -427,9 +427,10 @@ def runfilter(context, mapping, data): sym = findsymbolicname(arg) if sym: msg = (_("template filter '%s' is not compatible with keyword '%s'") - % (filt.__name__.encode('ascii'), sym)) + % (pycompat.sysbytes(filt.__name__), sym)) else: - msg = _("incompatible use of template filter '%s'") % filt.__name__ + msg = (_("incompatible use of template filter '%s'") + % pycompat.sysbytes(filt.__name__)) raise error.Abort(msg) def buildmap(exp, context):