patch from flub to allow callable objects as hook implementations

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-09-07 10:03:11 +02:00
parent 95bafbccd1
commit c17bb32f70
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -259,6 +259,8 @@ class MultiCall:
return kwargs
def varnames(func):
if not inspect.isfunction(func) and not inspect.ismethod(func):
func = getattr(func, '__call__', func)
ismethod = inspect.ismethod(func)
rawcode = py.code.getrawcode(func)
try: