Commit 84f44d55 authored by Jérome Perrin's avatar Jérome Perrin

rmtree: fix rmtree with broken symlinks on python >= 3.8

After https://github.com/python/cpython/issues/86180 func is os.open
parent 00d423bd
Pipeline #24673 passed with stage
in 0 seconds
......@@ -102,7 +102,7 @@ def rmtree (path):
"""
if func is os.path.islink:
os.unlink(path)
elif func is os.lstat:
elif func is os.lstat or func is os.open:
if not os.path.islink(path):
raise
os.unlink(path)
......
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