quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory (Grisha) Trubetskoy" <gri...@apache.org>
Subject Re: server cleanup functions run in restricted mode
Date Tue, 06 Apr 2004 20:45:08 GMT

What version of mod_python is this?

Restricted mode is a strange beast, in that there isn't really anything
like a "restricted mode" flag, but it looks at a pointer somwhere (don't
remember now), and if it's not what is expected, it concludes that it's in
restricted mode. So this behaviour is actually a sign of a bug where an
object is created in one subinterpreter but is running in another... These
bugs can be hard to track down.

Grisha


On Tue, 6 Apr 2004, David Fraser wrote:

> Hi
>
> It seems that server cleanup functions registered with
> server.register_cleanup run in restricted mode.
> I'm trying to use them to close a database connection and being run in
> restricted mode causes problems.
> I can't see in the code where this gets set, but I get the following error:
> [Tue Apr 06 17:16:01 2004] [error] python_cleanup: Error calling cleanup
> object <bound method jLogbookMultiServer.onshutdown of
> <jLogbook.python.jlogbook.jLogbookMultiServer object at 0x00A62670>>
> [Tue Apr 06 17:16:01 2004] [error]     exceptions.RuntimeError:
> instance.__dict__ not accessible in restricted mode
>
> Is there a reason that the server functions needed to be run in
> restricted mode, or is there a better way I should do this?
>
> David
>

Mime
View raw message