Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
41f08f21
Commit
41f08f21
authored
Nov 06, 2010
by
Éric Araujo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent race condition with mkdir in distutils. Patch by Arfrever on #9281.
parent
74c36387
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
dir_util.py
dir_util.py
+4
-3
No files found.
dir_util.py
View file @
41f08f21
...
@@ -69,10 +69,11 @@ def mkpath(name, mode=0o777, verbose=1, dry_run=0):
...
@@ -69,10 +69,11 @@ def mkpath(name, mode=0o777, 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
as
exc
:
except
OSError
as
exc
:
raise
DistutilsFileError
(
if
not
(
exc
.
errno
==
errno
.
EEXIST
and
os
.
path
.
isdir
(
head
)):
"could not create '%s': %s"
%
(
head
,
exc
.
args
[
-
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment