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:
Martin v. Löwis 2006-05-11 13:28:43 +00:00
parent 38e3b7d2d3
commit 879768dd97
8 changed files with 234 additions and 37 deletions

View file

@ -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