ソースを参照

Merge pull request #51854 from akien-mga/scons-progress-fix-open-error

SCons: Fix potential error when pruning cache on CI
Rémi Verschelde 4 年 前
コミット
8376af3c31
1 ファイル変更6 行追加3 行削除
  1. 6 3
      methods.py

+ 6 - 3
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: