Commit d7f8760f authored by Éric Araujo's avatar Éric Araujo

Merged revisions 86244 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86244 | eric.araujo | 2010-11-06 05:48:05 +0100 (sam., 06 nov. 2010) | 3 lines

  Prevent race condition with mkdir in distutils.  Patch by Arfrever on #9281.
........
parent c705a947
......@@ -69,10 +69,11 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0):
if not dry_run:
try:
os.mkdir(head, mode)
created_dirs.append(head)
except OSError as exc:
raise DistutilsFileError(
"could not create '%s': %s" % (head, exc.args[-1]))
if not (exc.errno == errno.EEXIST and os.path.isdir(head)):
raise DistutilsFileError(
"could not create '%s': %s" % (head, exc.args[-1]))
created_dirs.append(head)
_path_created[abs_head] = 1
return created_dirs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment