diff options
| author | Georg Brandl <georg@python.org> | 2010-04-18 09:55:38 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-04-18 09:55:38 +0200 |
| commit | f5d52fa4f454db08b6acb661748d1811770a959e (patch) | |
| tree | 22ebdfc55ee57403e679275488316a24a87add89 | |
| parent | 2c8e51a17b3e99bd9106d589970e412b5b5063af (diff) | |
| download | sphinx-git-f5d52fa4f454db08b6acb661748d1811770a959e.tar.gz | |
#377: Fix crash in linkcheck builder if all parent nodes have no line number set.
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | sphinx/builders/linkcheck.py | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -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:': |
