Preserving logging streams through a daemon.DaemonContext switch (was: daemon.DaemonContext)

Vinay Sajip vinay_sajip at
Fri Apr 9 15:26:36 CEST 2010

On Apr 9, 12:46 am, Ben Finney <ben+pyt... at> wrote:
> > I think you just have to pass the file object used by the handler
> > ( in the files_preserve array.
> Not quite. As the docs specify, you need to pass the *file descriptors*
> for the files you want preserved.

Okay, but the docstring you quoted:

"Elements of the list are file descriptors (as returned by a file
object's `fileno()` method) or Python `file` objects."

implies that would work as well as, and I
presume you internally do a hasattr(thingy, 'fileno') to get the


Vinay Sajip

More information about the Python-list mailing list