summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))