mercurial/templatefuncs.py
changeset 38254 12b6ee9e88f3
parent 38252 c2456a7726c1
child 38255 06d11cd90516
--- a/mercurial/templatefuncs.py	Sat Apr 21 17:43:16 2018 +0900
+++ b/mercurial/templatefuncs.py	Wed Mar 21 01:39:44 2018 +0900
@@ -262,12 +262,12 @@
         raise error.ParseError(_("get() expects two arguments"))
 
     dictarg = evalwrapped(context, mapping, args[0])
-    if not util.safehasattr(dictarg, 'get'):
+    if not util.safehasattr(dictarg, 'getmember'):
         # i18n: "get" is a keyword
         raise error.ParseError(_("get() expects a dict as first argument"))
 
     key = evalfuncarg(context, mapping, args[1])
-    return templateutil.getdictitem(dictarg, key)
+    return dictarg.getmember(context, mapping, key)
 
 @templatefunc('if(expr, then[, else])')
 def if_(context, mapping, args):