forked from github/pelican
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:
|
||||
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.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue