You might want to change "args" in the apache.register_cleanup()
function to be "data", to match existing documentation for other similar
methods. Use of "args" gives an impression that it is multiple values in
a list/tuple whereas in practice is a single value of any type. I used
"data" in my updated version in JIRA followup but probably didn't make
it clear enough in associated comments that the parameter name should
be changed as well as the default value. :-)
Ie., use:
def register_cleanup(handler,data=None):
_apache.register_cleanup(_interpreter,_server,handler,data)
On 06/08/2005, at 7:17 PM, Nicolas Lehuen (JIRA) wrote:
[ http://issues.apache.org/jira/browse/MODPYTHON-37?page=all ]
Nicolas Lehuen resolved MODPYTHON-37:
-------------------------------------
Fix Version: 3.2.0
Resolution: Fixed
I have integrated Graham's patch (with data=None instead of data=()).
I have also added a unit test to check whether the new
apache.register_cleanup funciton works correctly? I ran the unit test
and everything seems OK, there is no regression and the new function
is OK.
Add apache.register_cleanup().
------------------------------
Key: MODPYTHON-37
URL: http://issues.apache.org/jira/browse/MODPYTHON-37
Project: mod_python
Type: New Feature
Components: core
Versions: 3.1.4
Reporter: Graham Dumpleton
Priority: Minor
Fix For: 3.2.0
Attachments: register_cleanup.diff.txt
The only way to register cleanup methods to be executed upon child
termination
is through req.server.register_cleanup(). Since the cleanup method
isn't specific
to a request, it seems that there should also be an
apache.register_cleanup(). This
would allow cleanup function registration upon child termination to
be done from
a module imported using the PythonImport directive.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira