# HG changeset patch # User Goffi # Date 1597489393 -7200 # Node ID f2ce8072d89d0048c68c87a7da6243a79ef26add # Parent 5ff6e187084f5c72ea78318c6b14904d2f2ab006 tasks (brython): don't copy `__pycache__` to build_dir + fixed recursive copy diff -r 5ff6e187084f -r f2ce8072d89d libervia/server/tasks/implicit/task_brython.py --- 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)