Skip to content

Commit

Permalink
Error if file listed in config.yml content section does not exist
Browse files Browse the repository at this point in the history
(refs #9638)
  • Loading branch information
aeslaughter committed May 9, 2019
1 parent 41ce1a0 commit 739b697
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/MooseDocs/common/get_content.py
Expand Up @@ -10,6 +10,7 @@
#pylint: enable=missing-docstring
import os
import re
import copy
import logging
import mooseutils
import MooseDocs
Expand Down Expand Up @@ -106,6 +107,12 @@ def _doc_import(root_dir, content=None):
for pattern in exclude:
output -= _find_files(output, os.path.join(root_dir, pattern))

# Test the files exist
for fname in copy.copy(output):
if not os.path.isfile(fname):
LOG.error("Unknown file provided in content (it is being removed):\n{}".format(fname))
output.remove(fname)

return sorted(output)

def create_file_page(name, filename, in_ext):
Expand Down

0 comments on commit 739b697

Please sign in to comment.