Mercurial > libervia-web
changeset 1335:f2ce8072d89d
tasks (brython): don't copy `__pycache__` to build_dir + fixed recursive copy
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 15 Aug 2020 13:03:13 +0200 |
parents | 5ff6e187084f |
children | 71f24ad99a2c |
files | libervia/server/tasks/implicit/task_brython.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/server/tasks/implicit/task_brython.py Sat Aug 15 13:03:10 2020 +0200 +++ b/libervia/server/tasks/implicit/task_brython.py Sat Aug 15 13:03:13 2020 +0200 @@ -86,7 +86,9 @@ for p in files_paths: log.debug(f"copying {p}") if p.is_dir(): - shutil.copytree(p, dest) + if p.name == '__pycache__': + continue + shutil.copytree(p, dest / p.name) else: shutil.copy(p, dest) @@ -117,6 +119,7 @@ "template", {})['body_onload'] = self.getBodyOnload() else: page_dyn_path = dyn_path / url_hash + log.debug(f"using dynamic path at {page_dyn_path}") if page_dyn_path.exists(): log.debug("cleaning existing path") shutil.rmtree(page_dyn_path)