1. Georg Brandl
  2. sphinx

Commits

Georg Brandl  committed 247728c

#573: Fix KeyErrors occurring on rebuild after removing a file.

  • Participants
  • Parent commits 71c5924
  • Branches default

Comments (0)

Files changed (2)

File CHANGES

View file
 Release 1.0.7 (in development)
 ==============================
 
+* #573: Fix KeyErrors occurring on rebuild after removing a file.
+
 * Fix a traceback when removing files with globbed toctrees.
 
 * If an autodoc object cannot be imported, always re-read the

File sphinx/builders/__init__.py

View file
         # add all toctree-containing files that may have changed
         for docname in list(docnames):
             for tocdocname in self.env.files_to_rebuild.get(docname, []):
-                docnames.add(tocdocname)
+                if tocdocname in self.env.found_docs:
+                    docnames.add(tocdocname)
         docnames.add(self.config.master_doc)
 
         self.info(bold('preparing documents... '), nonl=True)