mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
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. ........
This commit is contained in:
parent
e28665aa8e
commit
e9954b56f4
2 changed files with 7 additions and 3 deletions
|
@ -69,10 +69,11 @@ def mkpath(name, mode=0777, verbose=1, dry_run=0):
|
||||||
if not dry_run:
|
if not dry_run:
|
||||||
try:
|
try:
|
||||||
os.mkdir(head, mode)
|
os.mkdir(head, mode)
|
||||||
created_dirs.append(head)
|
|
||||||
except OSError, exc:
|
except OSError, exc:
|
||||||
raise DistutilsFileError, \
|
if not (exc.errno == errno.EEXIST and os.path.isdir(head)):
|
||||||
"could not create '%s': %s" % (head, exc[-1])
|
raise DistutilsFileError(
|
||||||
|
"could not create '%s': %s" % (head, exc.args[-1]))
|
||||||
|
created_dirs.append(head)
|
||||||
|
|
||||||
_path_created[abs_head] = 1
|
_path_created[abs_head] = 1
|
||||||
return created_dirs
|
return created_dirs
|
||||||
|
|
|
@ -69,6 +69,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #9281: Prevent race condition with mkdir in distutils. Patch by
|
||||||
|
Arfrever.
|
||||||
|
|
||||||
- Issue #10229: Fix caching error in gettext.
|
- Issue #10229: Fix caching error in gettext.
|
||||||
|
|
||||||
- Issue #10252: Close file objects in a timely manner in distutils code and
|
- Issue #10252: Close file objects in a timely manner in distutils code and
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue