Handle errors more gracefully.

This commit is contained in:
Georg Brandl 2008-03-25 10:20:09 +00:00
parent 10e231bf12
commit 55aacf998a

View File

@ -360,12 +360,17 @@ class BuildEnvironment:
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