Ignore errors on racing cleanup.

Occasionally on windows there seems to be a racing problem where rmtree
tries to delete something that no longer exists.  This seems to happen
when a build is cancelled/terminated while in-progress, so racing
actions in reproxy might have deleted the temporary file while autoninja
is cleaning up stuff.  In any case, missing a file in this case isn't
something to fail over.

Bug: b/329738642
Change-Id: I86240e31093c6415707878277b01db5931b175ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5376532
Reviewed-by: Ben Segall <bentekkie@google.com>
Commit-Queue: Michael Savigny <msavigny@google.com>
changes/32/5376532/4
Michael Savigny 12 months ago committed by LUCI CQ
parent 3b930dbd13
commit 083ed2e307

@ -170,7 +170,7 @@ def datetime_now():
# Deletes the tree at dir if it exists.
def rmtree_if_exists(rm_dir):
if os.path.exists(rm_dir) and os.path.isdir(rm_dir):
shutil.rmtree(rm_dir)
shutil.rmtree(rm_dir, ignore_errors=True)
def set_reproxy_path_flags(out_dir, make_dirs=True):

Loading…
Cancel
Save