diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-08-18 21:57:42 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-08-18 22:19:51 +0200 |
commit | 825b245f0d3c705f10afc35f01236ba6b0140632 (patch) | |
tree | f541a8c264bfd8acc12c6603b7c07af2970074eb /methods.py | |
parent | f6626a40e5abc0d2fa2ece53ce501df716841c09 (diff) |
SCons: Fix potential error when pruning cache on CI
This could cause spurious errors on CI when trying to prune the cache,
as for some reason it tries to remove files/paths which do not exist.
That points at a bug in the `cache_progress` logic but at least this
workaround should prevent CI failures.
Diffstat (limited to 'methods.py')
-rw-r--r-- | methods.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/methods.py b/methods.py index 970bd10aa3..86a802bf5f 100644 --- a/methods.py +++ b/methods.py @@ -934,9 +934,12 @@ def show_progress(env): def progress_finish(target, source, env): nonlocal node_count, progressor - with open(node_count_fname, "w") as f: - f.write("%d\n" % node_count) - progressor.delete(progressor.file_list()) + try: + with open(node_count_fname, "w") as f: + f.write("%d\n" % node_count) + progressor.delete(progressor.file_list()) + except Exception: + pass try: with open(node_count_fname) as f: |