Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Xavier Thompson
slapos.buildout
Commits
b96efa4f
Commit
b96efa4f
authored
Jun 08, 2018
by
kbu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save the use and manipulation of the tries variable by using a for loop
parent
9a8cb0aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
src/zc/buildout/rmtree.py
src/zc/buildout/rmtree.py
+1
-3
No files found.
src/zc/buildout/rmtree.py
View file @
b96efa4f
...
@@ -57,13 +57,11 @@ def rmtree (path):
...
@@ -57,13 +57,11 @@ def rmtree (path):
"""
"""
def
retry_writeable
(
func
,
path
,
exc
):
def
retry_writeable
(
func
,
path
,
exc
):
os
.
chmod
(
path
,
384
)
# 0600
os
.
chmod
(
path
,
384
)
# 0600
tries
=
10
for
i
in
range
(
10
):
while
tries
:
try
:
try
:
func
(
path
)
func
(
path
)
break
break
except
OSError
:
except
OSError
:
tries
-=
1
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
else
:
else
:
# tried 10 times without success, thus
# tried 10 times without success, thus
...
...
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