[Python-checkins] r62182 - doctools/trunk/sphinx/builder.py

georg.brandl python-checkins at python.org
Sun Apr 6 12:17:14 CEST 2008


Author: georg.brandl
Date: Sun Apr  6 12:17:14 2008
New Revision: 62182

Modified:
   doctools/trunk/sphinx/builder.py
Log:
Fix traceback when moving documents.


Modified: doctools/trunk/sphinx/builder.py
==============================================================================
--- doctools/trunk/sphinx/builder.py	(original)
+++ doctools/trunk/sphinx/builder.py	Sun Apr  6 12:17:14 2008
@@ -527,10 +527,15 @@
                 targetmtime = path.getmtime(targetname)
             except Exception:
                 targetmtime = 0
-            srcmtime = max(path.getmtime(self.env.doc2path(docname)), template_mtime)
-            if srcmtime > targetmtime:
-                yield docname
-
+            try:
+                srcmtime = max(path.getmtime(self.env.doc2path(docname)),
+                               template_mtime)
+                if srcmtime > targetmtime:
+                    yield docname
+            except EnvironmentError:
+                # source doesn't exist anymore
+                pass
+                
     def load_indexer(self, docnames):
         try:
             f = open(path.join(self.outdir, 'searchindex.'+self.indexer_format), 'r')


More information about the Python-checkins mailing list