summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-08-18 22:43:35 +0200
committerGitHub <noreply@github.com>2021-08-18 22:43:35 +0200
commit8376af3c31e8432686e213abff0e9073d5e32b93 (patch)
treea4f6ae26caecf1903bcd557137f55438abc3ed75
parent5aecce775edf59c4e1a481178837c3df04deb7ef (diff)
parent825b245f0d3c705f10afc35f01236ba6b0140632 (diff)
Merge pull request #51854 from akien-mga/scons-progress-fix-open-error
SCons: Fix potential error when pruning cache on CI
-rw-r--r--methods.py9
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: