[Zope-Checkins] CVS: Packages/ZPublisher - BeforeTraverse.py:1.11.2.2

Evan Simpson evan at 4-am.com
Fri May 21 14:18:00 EDT 2004


Update of /cvs-repository/Packages/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv1911/lib/python/ZPublisher

Modified Files:
      Tag: Zope-2_7-branch
	BeforeTraverse.py 
Log Message:
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.


=== Packages/ZPublisher/BeforeTraverse.py 1.11.2.1 => 1.11.2.2 ===
--- Packages/ZPublisher/BeforeTraverse.py:1.11.2.1	Thu Dec 18 15:34:09 2003
+++ Packages/ZPublisher/BeforeTraverse.py	Fri May 21 14:17:59 2004
@@ -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