Commit f0151ce7 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Revert "incase of symlink, we should just delete it instead of calling...

Revert "incase of symlink, we should just delete it instead of calling os.chmod that tries to chmod the original that can raise 'Operation not permitted' error."

This reverts commit 2c2b8c43.
parent c576266f
......@@ -54,11 +54,8 @@ def rmtree (path):
0
"""
def retry_writeable (func, path, exc):
if func == os.path.islink:
os.unlink(path)
else:
os.chmod (path, 0600)
func (path)
os.chmod (path, 0600)
func (path)
shutil.rmtree (path, onerror = retry_writeable)
......
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