On 12 October 2001, Ray Drew said:
> I think the problem is that mod_python_handler.handler() doesn't call
> setup_logs so the log files don't get set and sys.stdout doesn't get
> re-directed.
Ahh yes, that would be it. Since CGI driver scripts are responsible for
calling setup_logs(), the mod_python handler has to do so as well.
> If you add a call to Publisher.setup_logs()..
^^^^^^^^^^^^^^^^^^^^
I think you meant "mod_python_handler.handler()" there, right?
OK, I've coded your patch slightly differently:
--- mod_python_handler.py 2001/09/28 21:03:22 1.5
+++ mod_python_handler.py 2001/10/15 13:24:42
@@ -44,4 +44,7 @@
else:
- if not name2publisher.has_key(package):
- name2publisher[package] = ModPythonPublisher(package)
- return name2publisher[package].publish_modpython(req)
+ pub = name2publisher.get(package)
+ if pub is None:
+ pub = ModPythonPublisher(package)
+ pub.setup_logs()
+ name2publisher[package] = pub
+ return pub.publish_modpython(req)
Can you apply that to the original mod_python_handler from Quixote 0.4.1
and verify that it works?
Thanks!
Greg
--
Greg Ward - software developer gward@mems-exchange.org
MEMS Exchange http://www.mems-exchange.org