Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
4f2fe1e0
Commit
4f2fe1e0
authored
Apr 16, 2001
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deleted files from the file list so walk() can continue.
parent
ceef7bf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
inst/walkandscrub.py
inst/walkandscrub.py
+3
-2
No files found.
inst/walkandscrub.py
View file @
4f2fe1e0
...
@@ -99,10 +99,10 @@ def walkandscrub(path):
...
@@ -99,10 +99,10 @@ def walkandscrub(path):
print
print
print
'-'
*
78
print
'-'
*
78
sys
.
stdout
.
write
(
sys
.
stdout
.
write
(
"Deleting '.pyc' and '.pyo' files recursively under %s...
"
%
path
"Deleting '.pyc' and '.pyo' files recursively under %s...
\
n
"
%
path
)
)
os
.
path
.
walk
(
path
,
scrub
,
[])
os
.
path
.
walk
(
path
,
scrub
,
[])
sys
.
stdout
.
write
(
'
d
one.
\
n
'
)
sys
.
stdout
.
write
(
'
D
one.
\
n
'
)
def
scrub
(
list
,
dirname
,
filelist
):
def
scrub
(
list
,
dirname
,
filelist
):
for
name
in
filelist
:
for
name
in
filelist
:
...
@@ -112,6 +112,7 @@ def scrub(list, dirname, filelist):
...
@@ -112,6 +112,7 @@ def scrub(list, dirname, filelist):
if
ext
==
'.pyo'
or
ext
==
'.pyc'
:
if
ext
==
'.pyo'
or
ext
==
'.pyc'
:
full
=
os
.
path
.
join
(
dirname
,
name
)
full
=
os
.
path
.
join
(
dirname
,
name
)
os
.
unlink
(
full
)
os
.
unlink
(
full
)
filelist
.
remove
(
name
)
if
DEBUG
:
print
full
if
DEBUG
:
print
full
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
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