On Apr 9, 12:46 am, Ben Finney <ben+pyt...@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
descriptor.

Regards,

Vinay Sajip
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to