From d18c4a8ca50361893eaa7ba86821a136ba7a4807 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 22 Sep 2009 07:22:56 -0400 Subject: The best way to get py3k support: same source runs on both, with some contortions. --- coverage/templite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/templite.py') diff --git a/coverage/templite.py b/coverage/templite.py index 75fce6d..23c805b 100644 --- a/coverage/templite.py +++ b/coverage/templite.py @@ -106,7 +106,7 @@ class _ContextAccess(object): value = getattr(value, dot) except AttributeError: value = value[dot] - if callable(value): + if hasattr(value, '__call__'): value = value() else: value = self.context[key] -- cgit v1.2.1