diff options
author | Josh Smith <joshsmith@codethink.co.uk> | 2018-07-26 13:43:40 +0100 |
---|---|---|
committer | Josh Smith <joshsmith@codethink.co.uk> | 2018-08-03 16:31:48 +0100 |
commit | e06907babb3edc47f7e220a8445dbd125aa3934e (patch) | |
tree | 3adc9b46ac93791ecfeea78e55eecbe5a02a16da | |
parent | a27de512404705404a9a4b2504d9e772ba310d97 (diff) | |
download | buildstream-Qinusty/backport-576.tar.gz |
cascache.py: Raise ArtifactError on grpc errorQinusty/backport-576
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 32de7d191..a8464c257 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_artifactcache/cascache.py @@ -238,7 +238,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 @@ -279,6 +280,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 = {} |