diff options
author | Josh Smith <joshsmith@codethink.co.uk> | 2018-07-26 13:43:40 +0100 |
---|---|---|
committer | Josh Smith <joshsmith@codethink.co.uk> | 2018-07-27 09:50:45 +0100 |
commit | fb222ba13fdd876f4a1506024d26d50675e49960 (patch) | |
tree | 722bb06da3f13df43354dd098252b06f7c5bfff0 | |
parent | 4d86e7c51a6729b29138dcc70ac738a3a9d7e1bd (diff) | |
download | buildstream-Qinusty/502.tar.gz |
cascache.py: Raise ArtifactError on grpc errorQinusty/502
This aims to fix issue #502.
-rw-r--r-- | buildstream/_artifactcache/cascache.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py index 6f5898426..3ef563368 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_artifactcache/cascache.py @@ -240,7 +240,8 @@ class CASCache(ArtifactCache): except grpc.RpcError as e: if e.code() != grpc.StatusCode.NOT_FOUND: - raise + raise ArtifactError("Failed to pull artifact {}: {}".format( + element._get_brief_display_key(), e)) from e return False @@ -285,6 +286,7 @@ class CASCache(ArtifactCache): except grpc.RpcError as e: if e.code() != grpc.StatusCode.NOT_FOUND: + # Intentionally re-raise RpcError for outer except block. raise missing_blobs = {} |