mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Elaborate the warning message when no files are processed by readers. (#2310)
Elaborate warning message when no files are processed by readers
This commit is contained in:
parent
20b39dc761
commit
ee24ad1821
1 changed files with 13 additions and 2 deletions
|
|
@ -403,6 +403,11 @@ def main():
|
||||||
try:
|
try:
|
||||||
pelican, settings = get_instance(args)
|
pelican, settings = get_instance(args)
|
||||||
readers = Readers(settings)
|
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,
|
watchers = {'content': folder_watcher(pelican.path,
|
||||||
readers.extensions,
|
readers.extensions,
|
||||||
|
|
@ -467,7 +472,10 @@ def main():
|
||||||
', '.join(k for k, v in modified.items() if v)))
|
', '.join(k for k, v in modified.items() if v)))
|
||||||
|
|
||||||
if modified['content'] is None:
|
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:
|
if modified['theme'] is None:
|
||||||
logger.warning('Empty theme folder. Using `basic` '
|
logger.warning('Empty theme folder. Using `basic` '
|
||||||
|
|
@ -490,7 +498,10 @@ def main():
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if next(watchers['content']) is None:
|
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:
|
if next(watchers['theme']) is None:
|
||||||
logger.warning('Empty theme folder. Using `basic` theme.')
|
logger.warning('Empty theme folder. Using `basic` theme.')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue