diff options
author | Valentin David <valentin.david@gmail.com> | 2018-10-04 15:31:22 +0000 |
---|---|---|
committer | Valentin David <valentin.david@gmail.com> | 2018-10-04 15:31:22 +0000 |
commit | b7b20d9e7c46d8b3bc7541437cc66905ffd28fc0 (patch) | |
tree | c973c1c583117153c694b2ac26c8922e0ad59afa | |
parent | 8630bac464a9b98654485a2b8699eb38083b0eb5 (diff) | |
parent | a79842185f3e762154002c6e928da30d6745568b (diff) | |
download | buildstream-b7b20d9e7c46d8b3bc7541437cc66905ffd28fc0.tar.gz |
Merge branch 'valentindavid/rmtree_oserror' into 'master'
Catch correct exception from shutil.rmtree
Closes #153
See merge request BuildStream/buildstream!849
-rw-r--r-- | buildstream/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/utils.py b/buildstream/utils.py index 5c11a363c..3ef1c4356 100644 --- a/buildstream/utils.py +++ b/buildstream/utils.py @@ -686,7 +686,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)) |