Commit 84ccbcfe authored by Florent Guillaume's avatar Florent Guillaume

Merge from 2_7-branch (evan, 2004-05-21):

MultiHook made the bogus assumption that hooks defined in classed would
use the same signature as hook functions added to instances. Well, they
*would*, but only after being transformed into bound methods. This means
that the before-publishing-traversal hook will have call signature
(container, request) as a function, but (self, container, request) as a
method, with self==container.
parent 9daeebe9
......@@ -94,8 +94,8 @@ class MultiHook:
def __call__(self, container, request):
if self._defined_in_class:
# Assume it's an unbound method
getattr(container.__class__, self._hookname)(container, request)
getattr(container.__class__, self._hookname)(container,
container, request)
prior = self._prior
if prior is not None:
prior(container, request)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment