Skip to content

Commit

Permalink
Fix #1831 -- ignore non-files in nikola check -l
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 18, 2015
1 parent c66282a commit 0868c96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -15,6 +15,7 @@ Features
Bugfixes
--------

* Quietly ignore non-existent files in ``nikola check -l`` (Issue #1831)
* Don’t rebuild all tag or category pages when changing tag/category descriptions
* Fix crash in wordpress code importer (Issue #1819)
* Call correct command in ``nikola auto``
Expand Down
4 changes: 4 additions & 0 deletions nikola/plugins/command/check.py
Expand Up @@ -192,6 +192,10 @@ def analyze(self, fname, find_sources=False, check_remote=False):
self.logger.notice("Ignoring {0} (in cache, links may be incorrect)".format(filename))
return False

if not os.path.exists(fname):
# Quietly ignore files that don’t exist; use `nikola check -f` instead (Issue #1831)
return False

d = lxml.html.fromstring(open(filename, 'rb').read())
for l in d.iterlinks():
target = l[2]
Expand Down

0 comments on commit 0868c96

Please sign in to comment.