Skip to content
Permalink
Browse files
Fix #1831 -- ignore non-files in nikola check -l
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 18, 2015
1 parent c66282a commit 0868c96d83f69638112617693124b81193a84ade
Showing with 5 additions and 0 deletions.
  1. +1 −0 CHANGES.txt
  2. +4 −0 nikola/plugins/command/check.py
@@ -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``
@@ -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]

0 comments on commit 0868c96

Please sign in to comment.