Created
August 9, 2021 20:04
-
-
Save kranzo/83966cbb41df775406a38ece21122854 to your computer and use it in GitHub Desktop.
ignore errors while deleting paths which not exist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py | |
index f92255d8dc..c08a47c3db 100644 | |
--- a/scripts/lib/scriptutils.py | |
+++ b/scripts/lib/scriptutils.py | |
@@ -215,7 +215,7 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr | |
pathvars = ['T', 'RECIPE_SYSROOT', 'RECIPE_SYSROOT_NATIVE'] | |
for pathvar in pathvars: | |
path = rd.getVar(pathvar) | |
- shutil.rmtree(path) | |
+ shutil.rmtree(path,ignore_errors=True) | |
finally: | |
if fetchrecipe: | |
try: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment