[mod_python] An odd use of the publisher

Colin Fox cfox at cfconsulting.ca
Sat Mar 13 22:20:23 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ron Alford wrote:
| Colin Fox wrote:
|
|> To get around the return issue, I'm finishing off my handler with this:
|>
|> ~    raise apache.SERVER_RETURN, apache.OK
|
|
| How does a straight 'return' with no arguments work? I thought I was
| using that at one point.
|
|
| -Ron

It doesn't work - but even if it did, what I'd like to return is the
success/failure code, not a string (which is what it's expecting).

I also want to be able to do redirections.

Raising an exception gives me the control I want, it's just that it
feels wierd to be doing that as a normal exit, rather than a problem exit.

I'd just like to be sure that nothing odd is going to happen if I raise
an exception. Or alternatively, how I could get processing similar to
what I get if I write my own handler (where you create a handler()
function and return a success code).

cf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAU/mnoaQ1/feGlJoRAlapAJ9offurXoKqw39FN+lyiVE8RCSF5wCeLHn/
9uqZJIYZ+wg3WvNzWGKRJC4=
=qllQ
-----END PGP SIGNATURE-----


More information about the Mod_python mailing list