I'm using Zope 2.2.2 and for some personal reasons I need to patch the
publish function from Publish.py.
I used the usual __init__.py straegy to patch ZPublisher :

from MyModule import Mypublish
import ZPublisher.Publish
from ImageFile import ImageFile

# Patch the original publish function
ZPublisher.Publish.publish = Mypublish

But the fact is, publish is called several times at several places in
the source code, and especially from the publish_module function when an
exception is raised...
And, although my patch works most of the times, it doesn't work when an
exception is raised.

I may need to replace another 'publish' reference somewhere, but does
anyone know WHERE exactly ??

Many thanks,


If the only tool you have is a hammer, 
    you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
    vous avez tendance à voir chaque problème comme un clou. 
                                       --Abraham Maslow

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to