Graham Dumpleton
grahamd at dscpl.com.au
Tue Oct 18 23:52:06 EDT 2005
Jorey Bump wrote .. > Robert Squire wrote: > > > ----------------------------------------------------- > > Here is the file I'm using: > > ----------------------------------------------------- > > didactic htdocs # cat mptest.py > > from mod_python import apache > > > > def hadler(req): > > req.content_type = 'text/plain' > > req.sent_http_header() > > req.write("Hello World!") > > return apache.OK > > Are the typos in the file, or only in this message? FWIW, it is a known issue that mod_python doesn't correctly raise an error when you do make such a typo. See: http://issues.apache.org/jira/browse/MODPYTHON-46 This is fixed in 3.2 and having "mptest" but then "mptest.handler" not being present, should yield an error. Mod_python error: "PythonHandler mptest" Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/apache.py", line 291, in HandlerDispatch arg=req, silent=hlist.silent) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/apache.py", line 528, in resolve_object raise AttributeError, s AttributeError: module '/Users/grahamd/Sites/slash/mptest.py' contains no 'handler' Graham
|