Commit 82a9a7d8 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

[web] Do not try to rmtree symlinks in rmtreecontent()

There is a symlink in data directory (created by generate_static_dir() method)
and trying to rmtree() it will fail with an OSError. So we unlink() it
instead.

--HG--
branch : 3.25
parent 241bb09c67f7
......@@ -44,7 +44,7 @@ def rmtreecontent(dst):
itself)"""
for fname in os.listdir(dst):
fpath = osp.join(dst, fname)
if osp.isfile(fpath):
if osp.isfile(fpath) or osp.islink(fpath):
os.unlink(fpath)
else:
rmtree(fpath)
......
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