summaryrefslogtreecommitdiff
path: root/sphinx/util/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/compat.py')
-rw-r--r--sphinx/util/compat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/compat.py b/sphinx/util/compat.py
index 1567bad9e..5d8cbb3db 100644
--- a/sphinx/util/compat.py
+++ b/sphinx/util/compat.py
@@ -58,12 +58,12 @@ class IndexEntriesMigrator(SphinxTransform):
def apply(self, **kwargs):
# type: (Any) -> None
for node in self.document.traverse(addnodes.index):
- for entries in node['entries']:
+ for i, entries in enumerate(node['entries']):
if len(entries) == 4:
source, line = get_source_line(node)
warnings.warn('An old styled index node found: %r at (%s:%s)' %
(node, source, line), RemovedInSphinx40Warning)
- entries.extend([None])
+ node['entries'][i] = entries + (None,)
def setup(app):