[issue22107] tempfile module misinterprets access denied error on Windows

Roger Upole report at bugs.python.org
Wed Jul 30 14:40:41 CEST 2014


New submission from Roger Upole:

_mkstemp_inner assumes that an access denied error means that it
has generated a filename that matches an existing foldername.
However, in the case of a folder for which you don't have permissions to
create a file, this means it will loop thru the maximum possible number of files.
This causes it to hang for several seconds and eventually return a bogus
FileExistsError.

Similar behaviour exists in 2.7.7, but it throws an IOError instead.

http://bugs.python.org/issue18849 seems to be where this was introduced.

----------
components: Windows
messages: 224304
nosy: rupole
priority: normal
severity: normal
status: open
title: tempfile module misinterprets access denied error on Windows
versions: Python 2.7, Python 3.4

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


More information about the Python-bugs-list mailing list