Skip to content

Commit

Permalink
Explain rest null_logger
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 25, 2018
1 parent 9bc1d07 commit 3af2b73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nikola/plugins/compile/rest/__init__.py
Expand Up @@ -69,6 +69,8 @@ def read_metadata(self, post, lang=None):
lang = LocaleBorg().current_lang
source_path = post.translated_source_path(lang)

# Silence reST errors, some of which are due to a different
# environment. Real issues will be reported while compiling.
null_logger = logbook.Logger('NULL')
null_logger.handlers = [logbook.NullHandler()]
with io.open(source_path, 'r', encoding='utf-8') as inf:
Expand Down

0 comments on commit 3af2b73

Please sign in to comment.