summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorAlexander Neben <alexander.neben@mongodb.com>2022-12-20 22:42:20 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-12-20 23:41:37 +0000
commiteccc34a401de6bbb7fe56f6ad3a9aee3a2efe008 (patch)
tree3d1a2a4a03fb21725ce6120fd37245a8daa4e2c3 /buildscripts
parent5bf9462dbfd45ef59b7215d8f802d30554960923 (diff)
downloadmongo-eccc34a401de6bbb7fe56f6ad3a9aee3a2efe008.tar.gz
SERVER-72266 Fixed scons cache pruning
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/scons_cache_prune.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/buildscripts/scons_cache_prune.py b/buildscripts/scons_cache_prune.py
index 6391fbc0b9d..c9f4387e273 100644
--- a/buildscripts/scons_cache_prune.py
+++ b/buildscripts/scons_cache_prune.py
@@ -109,7 +109,11 @@ def prune_cache(cache_path, cache_size_gb, clean_ratio):
# check the atime again just to make sure something wasn't accessed while
# we pruning other files.
- if cache_item.time < os.stat(cache_item.path).st_atime:
+ try:
+ if cache_item.time < os.stat(cache_item.path).st_atime:
+ continue
+ except FileNotFoundError as err:
+ LOGGER.warning("Unable to find file %s : %s", cache_item, err)
continue
to_remove = cache_item.path + ".del"