Handle missing files correctly when checking for altered sources

This may happen when checking out older versions or parallel branches
This commit is contained in:
Florian Festi 2016-06-30 11:54:24 +02:00
parent d9efb53fc5
commit b3797c95ea
1 changed files with 4 additions and 1 deletions

View File

@ -54,7 +54,10 @@ class FileChecker(threading.Thread):
if self.checkmodules:
self._addModules()
for path, timestamp in self.timestamps.items():
if os.stat(path).st_mtime != timestamp:
try:
if os.stat(path).st_mtime != timestamp:
return False
except FileNotFoundError:
return False
return True