From ee24ad1821774db2bfb199100eced17270a961d3 Mon Sep 17 00:00:00 2001 From: Adrin Jalali Date: Fri, 22 Jun 2018 15:00:21 +0200 Subject: [PATCH] Elaborate the warning message when no files are processed by readers. (#2310) Elaborate warning message when no files are processed by readers --- pelican/__init__.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index 94012e70..87d8bc24 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -403,6 +403,11 @@ def main(): try: pelican, settings = get_instance(args) readers = Readers(settings) + reader_descs = sorted(set(['%s (%s)' % + (type(r).__name__, + ', '.join(r.file_extensions)) + for r in readers.readers.values() + if r.enabled])) watchers = {'content': folder_watcher(pelican.path, readers.extensions, @@ -467,7 +472,10 @@ def main(): ', '.join(k for k, v in modified.items() if v))) if modified['content'] is None: - logger.warning('No valid files found in content.') + logger.warning( + 'No valid files found in content for ' + + 'the active readers:\n' + + '\n'.join(reader_descs)) if modified['theme'] is None: logger.warning('Empty theme folder. Using `basic` ' @@ -490,7 +498,10 @@ def main(): else: if next(watchers['content']) is None: - logger.warning('No valid files found in content.') + logger.warning( + 'No valid files found in content for ' + + 'the active readers:\n' + + '\n'.join(reader_descs)) if next(watchers['theme']) is None: logger.warning('Empty theme folder. Using `basic` theme.')