Commits

Anonymous committed 65fb597

Handle errors more gracefully.

Comments (0)

Files changed (1)

sphinx/environment.py

                     continue
                 # finally, check the mtime of dependencies
                 for dep in self.dependencies.get(docname, ()):
-                    deppath = path.join(self.srcdir, dep)
-                    if not path.isfile(deppath):
-                        changed.add(docname)
-                        break
-                    depmtime = path.getmtime(deppath)
-                    if depmtime > mtime:
+                    try:
+                        deppath = path.join(self.srcdir, dep)
+                        if not path.isfile(deppath):
+                            changed.add(docname)
+                            break
+                        depmtime = path.getmtime(deppath)
+                        if depmtime > mtime:
+                            changed.add(docname)
+                            break
+                    except EnvironmentError:
+                        # give it another chance
                         changed.add(docname)
                         break