summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-04-18 09:55:38 +0200
committerGeorg Brandl <georg@python.org>2010-04-18 09:55:38 +0200
commitf5d52fa4f454db08b6acb661748d1811770a959e (patch)
tree22ebdfc55ee57403e679275488316a24a87add89
parent2c8e51a17b3e99bd9106d589970e412b5b5063af (diff)
downloadsphinx-git-f5d52fa4f454db08b6acb661748d1811770a959e.tar.gz
#377: Fix crash in linkcheck builder if all parent nodes have no line number set.
-rw-r--r--CHANGES2
-rw-r--r--sphinx/builders/linkcheck.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index d64a1f712..c9275c720 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
Release 0.6.6 (in development)
==============================
+* #377: Fix crash in linkcheck builder.
+
* #387: Fix the display of search results in ``dirhtml`` output.
* #376: In autodoc, fix display of parameter defaults containing
diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
index 300a13a10..1fead717a 100644
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -65,8 +65,10 @@ class CheckExternalLinksBuilder(Builder):
return
lineno = None
- while lineno is None and node:
+ while lineno is None:
node = node.parent
+ if node is None:
+ break
lineno = node.line
if uri[0:5] == 'http:' or uri[0:6] == 'https:':