Skip to content

Commit

Permalink
hey, I used lxml wrong! Also, fix #1776
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jun 1, 2015
1 parent 20b97c4 commit 403036b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nikola/plugins/command/check.py
Expand Up @@ -200,7 +200,7 @@ def analyze(self, fname, find_sources=False, check_remote=False):

d = lxml.html.fromstring(open(filename, 'rb').read())
for l in d.iterlinks():
target = l[0].attrib[l[1]]
target = l[2]
if target == "#":
continue
target, _ = urldefrag(target)
Expand Down Expand Up @@ -260,6 +260,7 @@ def analyze(self, fname, find_sources=False, check_remote=False):
self.existing_targets.add(target_filename)
else:
rv = True
import pdb; pdb.set_trace()
self.logger.warn("Broken link in {0}: {1}".format(filename, target))
if find_sources:
self.logger.warn("Possible sources:")
Expand Down

0 comments on commit 403036b

Please sign in to comment.