# HG changeset patch # User Denis Laxalde # Date 1492084652 -7200 # Node ID 8a1306c4365644dcbe564c65975a6e3404cd88f9 # Parent 241bb09c67f7266edc366090e9bb09f319c856b5 [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. diff -r 241bb09c67f7 -r 8a1306c43656 cubicweb/web/webctl.py --- a/cubicweb/web/webctl.py Thu Apr 13 12:20:30 2017 +0200 +++ b/cubicweb/web/webctl.py Thu Apr 13 13:57:32 2017 +0200 @@ -44,7 +44,7 @@ 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)