Fix unpack warning if combinated with 3rd party domain extensions

This commit is contained in:
Takeshi KOMIYA 2016-03-08 15:44:23 +09:00
parent a9ec1e1e77
commit 635c8eb417
2 changed files with 9 additions and 3 deletions

View File

@ -9,6 +9,7 @@ Bugs fixed
Documentation
-------------
* Fix unpack warning if combinated with 3rd party domain extensions.
Release 1.4 beta1 (released Mar 6, 2016)
========================================

View File

@ -1063,13 +1063,18 @@ class BuildEnvironment:
entries = self.indexentries[docname] = []
for node in document.traverse(addnodes.index):
try:
for type, value, tid, main, index_key in node['entries']:
split_index_msg(type, value)
for entry in node['entries']:
split_index_msg(entry[0], entry[1])
except ValueError as exc:
self.warn_node(exc, node)
node.parent.remove(node)
else:
entries.extend(node['entries'])
for entry in node['entries']:
if len(entry) == 5:
# Since 1.4: new index structure including index_key (5th column)
entries.append(entry)
else:
entries.append(entry + (None,))
def note_citations_from(self, docname, document):
for node in document.traverse(nodes.citation):