From 8ca3a2248d56fb417336eb78643466276551128c Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 19 Feb 2024 13:47:57 +0100 Subject: [PATCH] chore: raise error if any in storage post_process I'm not totally sure it's the way to go (maybe ignoring here is fine ?), but it seems still more usefull to have a proper error instead of a python error a few lines forward. --- umap/storage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/umap/storage.py b/umap/storage.py index 90764373..3ece91dc 100644 --- a/umap/storage.py +++ b/umap/storage.py @@ -41,8 +41,9 @@ class UmapManifestStaticFilesStorage(ManifestStaticFilesStorage): def post_process(self, paths, **options): collected = super().post_process(paths, **options) for original_path, processed_path, processed in collected: - if not processed_path: - print("Unused or missing file?", original_path) + if isinstance(processed, Exception): + print("Error with file", original_path) + raise processed if processed_path.endswith(".js"): path = Path(settings.STATIC_ROOT) / processed_path initial = path.read_text()