From 5519efef2e24a3fef506a1e19222fc49053e39a6 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 15 Aug 2023 17:45:50 +0100 Subject: [PATCH] Log watching files which don't exist --- pelican/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pelican/utils.py b/pelican/utils.py index 4832e0c1..d8a19e4b 100644 --- a/pelican/utils.py +++ b/pelican/utils.py @@ -773,7 +773,11 @@ def wait_for_changes(settings_file, reader_class, settings): os.path.join(content_path, path) for path in settings.get('STATIC_PATHS', []) ) - watching_paths = [os.path.abspath(p) for p in watching_paths if p and os.path.exists(p)] + watching_paths = [os.path.abspath(p) for p in watching_paths if p] + + for path in watching_paths: + if not os.path.exists(path): + logger.warning("Unable to watch path '%s' as it does not exist.", path) return next(watchfiles.watch( *watching_paths,