mirror of
https://github.com/python/cpython.git
synced 2025-09-10 02:36:56 +00:00
Change WindowsError to carry the Win32 error code in winerror,
and the DOS error code in errno. Revert changes where WindowsError catch blocks unnecessarily special-case OSError.
This commit is contained in:
parent
38e3b7d2d3
commit
879768dd97
8 changed files with 234 additions and 37 deletions
|
@ -327,10 +327,6 @@ def mkdtemp(suffix="", prefix=template, dir=None):
|
|||
try:
|
||||
_os.mkdir(file, 0700)
|
||||
return file
|
||||
except WindowsError, e:
|
||||
if e.errno == 183: # ERROR_ALREADY_EXISTS
|
||||
continue # try again
|
||||
raise
|
||||
except OSError, e:
|
||||
if e.errno == _errno.EEXIST:
|
||||
continue # try again
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue