Bläddra i källkod

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>
Michael Savigny 1 år sedan
förälder
incheckning
083ed2e307
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      reclient_helper.py

+ 1 - 1
reclient_helper.py

@@ -170,7 +170,7 @@ def datetime_now():
 # Deletes the tree at dir if it exists.
 # Deletes the tree at dir if it exists.
 def rmtree_if_exists(rm_dir):
 def rmtree_if_exists(rm_dir):
     if os.path.exists(rm_dir) and os.path.isdir(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):
 def set_reproxy_path_flags(out_dir, make_dirs=True):