diff mercurial/templater.py @ 14943:d3bb825ddae3

globally: use safehasattr(x, '__call__') instead of hasattr(x, '__call__')
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 16:24:37 -0500
parents 4a28cb4df1f8
children e2c413bde8a5
line wrap: on
line diff
--- a/mercurial/templater.py	Mon Jul 25 14:59:55 2011 -0500
+++ b/mercurial/templater.py	Mon Jul 25 16:24:37 2011 -0500
@@ -135,7 +135,7 @@
     v = mapping.get(key)
     if v is None:
         v = context._defaults.get(key, '')
-    if hasattr(v, '__call__'):
+    if util.safehasattr(v, '__call__'):
         return v(**mapping)
     return v