Georg Brandl avatar Georg Brandl committed aa82857

#377: Fix crash in linkcheck builder if all parent nodes have no line number set.

Comments (0)

Files changed (2)

 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

sphinx/builders/linkcheck.py

             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:':
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.