Commit b96efa4f authored by kbu's avatar kbu

save the use and manipulation of the tries variable by using a for loop

parent 9a8cb0aa
......@@ -57,13 +57,11 @@ def rmtree (path):
"""
def retry_writeable (func, path, exc):
os.chmod (path, 384) # 0600
tries = 10
while tries:
for i in range(10):
try:
func (path)
break
except OSError:
tries -= 1
time.sleep(0.1)
else:
# tried 10 times without success, thus
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment