diff genshi/template/plugin.py @ 798:c690de5abafd stable-0.5.x

Ported [914], [970], and [971] to 0.5.x branch.
author cmlenz
date Thu, 15 Jan 2009 23:50:09 +0000
parents cf0a0a066aec
children 0d9e87c6cf6e
line wrap: on
line diff
--- a/genshi/template/plugin.py
+++ b/genshi/template/plugin.py
@@ -57,7 +57,7 @@
                                      options.get('genshi.max_cache_size'))
 
         loader_callback = options.get('genshi.loader_callback', None)
-        if loader_callback and not callable(loader_callback):
+        if loader_callback and not hasattr(loader_callback, '__call__'):
             raise ConfigurationError('loader callback must be a function')
 
         lookup_errors = options.get('genshi.lookup_errors', 'strict')
Copyright (C) 2012-2017 Edgewall Software