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.
(cherry picked from commit 825b245f0d
)
This commit is contained in:
parent
1aa7f05dd9
commit
6bcd7f6b54
|
@ -950,9 +950,12 @@ def show_progress(env):
|
||||||
return total_size
|
return total_size
|
||||||
|
|
||||||
def progress_finish(target, source, env):
|
def progress_finish(target, source, env):
|
||||||
|
try:
|
||||||
with open(node_count_data["fname"], "w") as f:
|
with open(node_count_data["fname"], "w") as f:
|
||||||
f.write("%d\n" % node_count_data["count"])
|
f.write("%d\n" % node_count_data["count"])
|
||||||
progressor.delete(progressor.file_list())
|
progressor.delete(progressor.file_list())
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(node_count_data["fname"]) as f:
|
with open(node_count_data["fname"]) as f:
|
||||||
|
|
Loading…
Reference in New Issue