Mercurial > public > mercurial-scm > hg
comparison mercurial/templater.py @ 34693:56bb07a0b75c
python3: move from using func_name to __name__
Previously reviewed as D964, but required some fixups and therefore
seems to need a new revision.
Differential Revision: https://phab.mercurial-scm.org/D1065
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 05 Oct 2017 14:15:05 -0400 |
parents | 3edfd472f3cb |
children | 56f085334611 |
comparison
equal
deleted
inserted
replaced
34692:4c322b95a6ab | 34693:56bb07a0b75c |
---|---|
425 return filt(thing) | 425 return filt(thing) |
426 except (ValueError, AttributeError, TypeError): | 426 except (ValueError, AttributeError, TypeError): |
427 sym = findsymbolicname(arg) | 427 sym = findsymbolicname(arg) |
428 if sym: | 428 if sym: |
429 msg = (_("template filter '%s' is not compatible with keyword '%s'") | 429 msg = (_("template filter '%s' is not compatible with keyword '%s'") |
430 % (filt.func_name, sym)) | 430 % (filt.__name__, sym)) |
431 else: | 431 else: |
432 msg = _("incompatible use of template filter '%s'") % filt.func_name | 432 msg = _("incompatible use of template filter '%s'") % filt.__name__ |
433 raise error.Abort(msg) | 433 raise error.Abort(msg) |
434 | 434 |
435 def buildmap(exp, context): | 435 def buildmap(exp, context): |
436 darg = compileexp(exp[1], context, methods) | 436 darg = compileexp(exp[1], context, methods) |
437 targ = gettemplate(exp[2], context) | 437 targ = gettemplate(exp[2], context) |