summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin David <valentin.david@gmail.com>2018-10-04 15:16:46 +0000
committerValentin David <valentin.david@gmail.com>2018-10-04 15:16:46 +0000
commit96f09d4878c25ecf74ab18b5650b0db9015f13e9 (patch)
tree85004b28e2a775a4775ba1d87ee44abc67a5fb99
parenteb92e8e9f51b46d03455e9c67441d4dfec0a5795 (diff)
parent26d48cc9c3870eb9ca3dd7816d32b8fe0606414e (diff)
downloadbuildstream-96f09d4878c25ecf74ab18b5650b0db9015f13e9.tar.gz
Merge branch 'valentindavid/rmtree_oserror-1.2' into 'bst-1.2'
Catch correct exception from shutil.rmtree [bst-1.2] See merge request BuildStream/buildstream!861
-rw-r--r--buildstream/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/utils.py b/buildstream/utils.py
index 34c0f898b..992218b5e 100644
--- a/buildstream/utils.py
+++ b/buildstream/utils.py
@@ -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))