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
8a2d33ca
Commit
8a2d33ca
authored
May 08, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace instances of os.path.walk with os.walk
parent
a59a6118
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
archive_util.py
archive_util.py
+6
-8
No files found.
archive_util.py
View file @
8a2d33ca
...
...
@@ -95,18 +95,16 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0):
log
.
info
(
"creating '%s' and adding '%s' to it"
,
zip_filename
,
base_dir
)
def
visit
(
z
,
dirname
,
names
):
for
name
in
names
:
path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
dirname
,
name
))
if
os
.
path
.
isfile
(
path
):
z
.
write
(
path
,
path
)
log
.
info
(
"adding '%s'"
%
path
)
if
not
dry_run
:
z
=
zipfile
.
ZipFile
(
zip_filename
,
"w"
,
compression
=
zipfile
.
ZIP_DEFLATED
)
os
.
path
.
walk
(
base_dir
,
visit
,
z
)
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
base_dir
):
for
name
in
filenames
:
path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
dirpath
,
name
))
if
os
.
path
.
isfile
(
path
):
z
.
write
(
path
,
path
)
log
.
info
(
"adding '%s'"
%
path
)
z
.
close
()
return
zip_filename
...
...
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