Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
da4d1aef
Commit
da4d1aef
authored
Mar 29, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch from Bastian Kleineidam <calvin@cs.uni-sb.de>:
make 'mkdir()' return list of directories created.
parent
7c1a6d47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Lib/distutils/util.py
Lib/distutils/util.py
+5
-3
No files found.
Lib/distutils/util.py
View file @
da4d1aef
...
...
@@ -38,11 +38,11 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0):
# we're not using a recursive algorithm)
name
=
os
.
path
.
normpath
(
name
)
created_dirs
=
[]
if
os
.
path
.
isdir
(
name
)
or
name
==
''
:
return
return
created_dirs
if
PATH_CREATED
.
get
(
name
):
return
return
created_dirs
(
head
,
tail
)
=
os
.
path
.
split
(
name
)
tails
=
[
tail
]
# stack of lone dirs to create
...
...
@@ -70,11 +70,13 @@ def mkpath (name, mode=0777, verbose=0, dry_run=0):
if
not
dry_run
:
try
:
os
.
mkdir
(
head
)
created_dirs
.
append
(
head
)
except
os
.
error
,
(
errno
,
errstr
):
raise
DistutilsFileError
,
\
"could not create '%s': %s"
%
(
head
,
errstr
)
PATH_CREATED
[
head
]
=
1
return
created_dirs
# mkpath ()
...
...
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