##// END OF EJS Templates
templater: add try-except stub to runmember()...
Yuya Nishihara -
r38259:ad06a426 default
parent child Browse files
Show More
@@ -666,14 +666,16 b' def runmember(context, mapping, data):'
666 666 if util.safehasattr(d, 'tomap'):
667 667 lm = context.overlaymap(mapping, d.tomap())
668 668 return runsymbol(context, lm, memb)
669 if util.safehasattr(d, 'get'):
670 return getdictitem(d, memb)
671
672 sym = findsymbolicname(darg)
673 if sym:
674 raise error.ParseError(_("keyword '%s' has no member") % sym)
675 else:
676 raise error.ParseError(_("%r has no member") % pycompat.bytestr(d))
669 try:
670 if util.safehasattr(d, 'get'):
671 return getdictitem(d, memb)
672 raise error.ParseError
673 except error.ParseError:
674 sym = findsymbolicname(darg)
675 if sym:
676 raise error.ParseError(_("keyword '%s' has no member") % sym)
677 else:
678 raise error.ParseError(_("%r has no member") % pycompat.bytestr(d))
677 679
678 680 def runnegate(context, mapping, data):
679 681 data = evalinteger(context, mapping, data,
General Comments 0
You need to be logged in to leave comments. Login now