[Zope-dev] __before_publishing_traverse__ problem (2 args only)

Dieter Maurer dieter at handshake.de
Mon Oct 20 13:47:03 EDT 2003


Tobias Herp wrote at 2003-10-20 15:15 +0200:
 > I have a Python product which defines a __before_publishing_traverse_ 
 > method.  At last I thought it would all work fine now...
 > 
 > Now I added one of my User Folder objects and got an exception because 
 > __before_publishing_traverse__ was called with only two arguments 
 > instead of three.

In "Products.CMFCore.DynamicType.DynamicType.__before_publishing_traverse"
I see code like:

    def __before_publishing_traverse__(self, arg1, arg2=None):
        """ Pre-traversal hook.
        """
        # XXX hack around a bug(?) in BeforeTraverse.MultiHook
        REQUEST = arg2 or arg1

Apparently, your problem has been observerd by others and they
worked around it this way.


Dieter



More information about the Zope-Dev mailing list