aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-02-19 19:53:00 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-02-20 23:12:40 +0530
commitbf6c528a3eb2955ca41c8bf2c3f9f93cf12b5784 (patch)
tree8b27034d53333d038273575351d5ee2ea36dde43
parent5e043d19f600a7aedf65bddc8b4adea094aba4c6 (diff)
downloadmeson-bf6c528a3eb2955ca41c8bf2c3f9f93cf12b5784.zip
meson-bf6c528a3eb2955ca41c8bf2c3f9f93cf12b5784.tar.gz
meson-bf6c528a3eb2955ca41c8bf2c3f9f93cf12b5784.tar.bz2
rmtree: Don't retry when the file is not found
No need to pointlessly loop for several seconds in this case.
-rw-r--r--mesonbuild/mesonlib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index 49bc6ed..19c4322 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -876,6 +876,8 @@ def windows_proof_rmtree(f):
try:
shutil.rmtree(f)
return
+ except FileNotFoundError:
+ return
except (OSError, PermissionError):
time.sleep(d)
# Try one last time and throw if it fails.