[Zope-Checkins]
SVN: Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py
Merge from 2_7-branch (evan, 2004-05-21):
Florent Guillaume
fg at nuxeo.com
Fri Nov 12 10:11:54 EST 2004
Log message for revision 28444:
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.
Changed:
U Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py
-=-
Modified: Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py
===================================================================
--- Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py 2004-11-12 09:54:09 UTC (rev 28443)
+++ Zope/trunk/lib/python/ZPublisher/BeforeTraverse.py 2004-11-12 15:11:54 UTC (rev 28444)
@@ -94,8 +94,8 @@
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)
More information about the Zope-Checkins
mailing list