New submission from jort bloem:
Issue occurs in the following code:
tempfile.NamedTemporaryFile(dir=".",delete=False).write("hello")
The NamedTemporaryFile is deleted before the write is complete; deleting the
object closes the file, so the write fails.
----------
messages: 196485
nosy: jort.bloem
priority: normal
severity: normal
status: open
title: tempfile.NamedTemporaryFile can close the file too early, if not
assigning to a variable
type: behavior
versions: Python 2.6, Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18879>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com