how to overwrite webdav.NullResource.NullResource.PUT
Hello! How can I overwrite the PUT method in "webdav.NullResource.NullResource" in the __init__.py of my product. The following doesn't work: [...] import webdav.NullResource def myPUT(self, REQUEST, RESPONSE): [original code] webdav.NullResource.NullResource.PUT = myPUT overwriting "webdav.NullResource.NullResource._default_PUT_factory" works fine: def PUT_factory( self, name, typ, body ): [original + my own code] webdav.NullResource.NullResource._default_PUT_factory = PUT_factory Bye Marcus -- Petition for a Software Patent Free Europe http://petition.eurolinux.org
Marcus Schopen writes:
... The following doesn't work:
[...] import webdav.NullResource
def myPUT(self, REQUEST, RESPONSE): [original code]
webdav.NullResource.NullResource.PUT = myPUT In what way does it not work?
It should... Dieter
Hi Dieter,
The following doesn't work:
[...] import webdav.NullResource
def myPUT(self, REQUEST, RESPONSE): [original code]
webdav.NullResource.NullResource.PUT = myPUT
In what way does it not work?
It should...
When creating objects through FTP access ZOPE (on Linux) gives no tracebacks. FTP upload just hangs. That's why I can't figure out the exact problem. Any idea to debug that? Thanks Marcus -- Petition for a Software Patent Free Europe http://petition.eurolinux.org
Marcus Schopen writes:
The following doesn't work:
[...] import webdav.NullResource
def myPUT(self, REQUEST, RESPONSE): [original code]
webdav.NullResource.NullResource.PUT = myPUT
In what way does it not work?
It should...
When creating objects through FTP access ZOPE (on Linux) gives no tracebacks. FTP upload just hangs. That's why I can't figure out the exact problem. Any idea to debug that? I would insert a
import pdb; pdb.set_trace() at an appropriate place. Zope will stop, when it executes this code. If Zope was started in a terminal window, you can use PDB (--> Python documentation) commands to analyse the state and single step through the code. An alternative would be to find the "try except" that intercepts the exception and add a "from traceback import print_exc; print_exc()" in the "except" clause. Dieter
participants (2)
-
Dieter Maurer -
Marcus Schopen