Commits

Georg Brandl committed a3ed930

Closes #864: Fix crash with some settings of :confval:`modindex_common_prefix`.

  • Participants
  • Parent commits 3107786
  • Branches stable

Comments (0)

Files changed (2)

 * #860: Do not crash when encountering invalid doctest examples, just
   emit a warning.
 
+* #864: Fix crash with some settings of :confval:`modindex_common_prefix`.
+
 
 Release 1.1.2 (Nov 1, 2011) -- 1.1.1 is a silly version number anyway!
 ======================================================================

File sphinx/domains/python.py

                 # it's a submodule
                 if prev_modname == package:
                     # first submodule - make parent a group head
-                    entries[-1][1] = 1
+                    if entries:
+                        entries[-1][1] = 1
                 elif not prev_modname.startswith(package):
                     # submodule without parent in list, add dummy entry
                     entries.append([stripped + package, 1, '', '', '', '', ''])