Mercurial > hg
changeset 34838:d3ea6a1c798f
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
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 17 Oct 2017 10:51:43 -0400 |
parents | 4fdc4adbc838 |
children | 110040e715c9 |
files | mercurial/templater.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templater.py Mon Oct 16 22:44:43 2017 -0400 +++ b/mercurial/templater.py Tue Oct 17 10:51:43 2017 -0400 @@ -427,9 +427,10 @@ 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):