mercurial/templater.py
changeset 34838 d3ea6a1c798f
parent 34808 e87e62b7fc0b
child 35010 b81ad5b78a81
child 35386 fdd09d87635b
equal deleted inserted replaced
34837:4fdc4adbc838 34838:d3ea6a1c798f
   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.__name__.encode('ascii'), sym))
   430                    % (pycompat.sysbytes(filt.__name__), sym))
   431         else:
   431         else:
   432             msg = _("incompatible use of template filter '%s'") % filt.__name__
   432             msg = (_("incompatible use of template filter '%s'")
       
   433                    % pycompat.sysbytes(filt.__name__))
   433         raise error.Abort(msg)
   434         raise error.Abort(msg)
   434 
   435 
   435 def buildmap(exp, context):
   436 def buildmap(exp, context):
   436     darg = compileexp(exp[1], context, methods)
   437     darg = compileexp(exp[1], context, methods)
   437     targ = gettemplate(exp[2], context)
   438     targ = gettemplate(exp[2], context)