Skip to content

Commit

Permalink
#2465: latex builder fails in case no caption option is provided to t…
Browse files Browse the repository at this point in the history
…octree directive
  • Loading branch information
tk0miya committed Apr 22, 2016
1 parent becc547 commit 88322af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bugs fixed
* #2456: C++, fix crash related to document merging (e.g., singlehtml and Latex builders).
* #2446: latex(pdf) sets local tables of contents (or more generally topic nodes) in unbreakable boxes, causes overflow at bottom
* #2476: Omit MathJax markers if :nowrap: is given
* #2465: latex builder fails in case no caption option is provided to toctree directive


Release 1.4.1 (released Apr 12, 2016)
Expand Down
2 changes: 1 addition & 1 deletion sphinx/builders/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def get_contentsname(self, indexfile):
tree = self.env.get_doctree(indexfile)
contentsname = None
for toctree in tree.traverse(addnodes.toctree):
if toctree['caption']:
if 'caption' in toctree:
contentsname = toctree['caption']
break

Expand Down

0 comments on commit 88322af

Please sign in to comment.