Preserving logging streams through a daemon.DaemonContext switch (was: daemon.DaemonContext)
vinay_sajip at yahoo.co.uk
Fri Apr 9 15:26:36 CEST 2010
On Apr 9, 12:46 am, Ben Finney <ben+pyt... at benfinney.id.au> wrote:
> > I think you just have to pass the file object used by the handler
> > (fh.stream) 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 fh.stream would work as well as fh.stream.fileno(), and I
presume you internally do a hasattr(thingy, 'fileno') to get the
More information about the Python-list