[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

Nick Coghlan report at bugs.python.org
Fri Aug 30 01:33:40 CEST 2013


Nick Coghlan added the comment:

The method call should keep the file object alive until it completes (due to the self reference). What behaviour prompted the conclusion that it is being closed early?

If the symptom is that the data isn't being written to disk, we may have a missing flush() call somewhere causing a race condition.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18879>
_______________________________________


More information about the Python-bugs-list mailing list