Commit 96f09d48 authored by Valentin David's avatar Valentin David

Merge branch 'valentindavid/rmtree_oserror-1.2' into 'bst-1.2'

Catch correct exception from shutil.rmtree [bst-1.2]

See merge request !861
parents eb92e8e9 26d48cc9
Pipeline #32024374 passed with stages
in 20 minutes and 13 seconds
......@@ -679,7 +679,7 @@ def _force_rmtree(rootpath, **kwargs):
try:
shutil.rmtree(rootpath, **kwargs)
except shutil.Error as e:
except OSError as e:
raise UtilError("Failed to remove cache directory '{}': {}"
.format(rootpath, e))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment