Fix #3657: EPUB builder crashes if document startswith genindex exists

This commit is contained in:
Takeshi KOMIYA
2017-04-27 21:44:46 +09:00
parent 67c1a8a59e
commit 5c5272c4ab
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -16,6 +16,7 @@ Bugs fixed
* #3614: Sphinx crashes with requests-2.5.0
* #3618: autodoc crashes with tupled arguments
* #3664: No space after the bullet in items of a latex list produced by Sphinx
* #3657: EPUB builder crashes if document startswith genindex exists
Testing
--------
+1 -1
View File
@@ -500,7 +500,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
This method is overwritten for genindex pages in order to fix href link
attributes.
"""
if pagename.startswith('genindex'):
if pagename.startswith('genindex') and 'genindexentries' in addctx:
if not self.use_index:
return
self.fix_genindex(addctx['genindexentries'])