[docs] delete user folder before writing new files (so old files will be deleted)

This commit is contained in:
Rushabh Mehta 2016-01-18 10:42:06 +05:30
parent 39e75cb0c1
commit c47590ae04

View file

@ -116,8 +116,10 @@ class setup_docs(object):
# make /user
user_path = os.path.join(self.docs_path, "user")
if not os.path.exists(user_path):
os.makedirs(user_path)
if os.path.exists(user_path):
shutil.rmtree(user_path, ignore_errors=True)
os.makedirs(user_path)
# make /assets/img
img_path = os.path.join(self.docs_path, "assets", "img")