summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-04-09 08:38:23 +0200
committerStef Walter <stefw@redhat.com>2014-04-09 08:38:23 +0200
commitc9cbfab9f6325ce4ef01292287734a1cb2243e3c (patch)
treee8e5924111d72855b06225b41ccf9769ebe337fb
parent508b7545a1bc8322e9bd2f0921384a2c743f0d07 (diff)
Fix issue where we try to look up mtime of modified files
-rwxr-xr-xgit-coverage4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-coverage b/git-coverage
index b076886..483e9e7 100755
--- a/git-coverage
+++ b/git-coverage
@@ -347,7 +347,9 @@ class GccCoverage:
matches = []
bad_mtime = False
gcnos = self._gcno_cache.get(source, [])
- mtime = os.path.getmtime(source)
+ mtime = 0
+ if os.path.exists(source):
+ mtime = os.path.getmtime(source)
for gcno in gcnos:
# If the source file has been modified later than the