rmtree: Don't retry when the file is not found
No need to pointlessly loop for several seconds in this case.
@@ -903,6 +903,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.
