diff mercurial/templater.py @ 8366:0bf0045000b5

some modernization cleanups, forward compatibility
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 13 May 2009 14:08:39 +0200
parents d8c5a7f25a40
children bccc90b56d02
line wrap: on
line diff
--- a/mercurial/templater.py	Tue May 12 10:03:36 2009 -0400
+++ b/mercurial/templater.py	Wed May 13 14:08:39 2009 +0200
@@ -89,7 +89,7 @@
                 v = map[key]
             else:
                 v = self.defaults.get(key, "")
-            if callable(v):
+            if hasattr(v, '__call__'):
                 v = v(**map)
             if format:
                 if not hasattr(v, '__iter__'):