Martin Panter added the comment:
This looks like an extension of Issue 21058. Does the unlink() work on Windows?
It seems to me that the file is configured to remove itself on close(),
therefore I expect unlink() will raise an exception of its own. Also made some
suggestions in the code review.
This problem also affects Python 2, if you fudge the right wrong parameters:
>>> NamedTemporaryFile((), prefix="blaua.")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/proj/python/cpython/Lib/tempfile.py", line 477, in
NamedTemporaryFile
file = _os.fdopen(fd, mode, bufsize)
TypeError: argument 2 must be string, not tuple
[59140 refs]
>>> glob("/tmp/blaua.*")
['/tmp/blaua.AFtEqx']
----------
nosy: +martin.panter
versions: +Python 2.7 -Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26385>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com