diff options
author | Jürg Billeter <j@bitron.ch> | 2018-10-11 13:57:21 -0400 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-10-15 11:07:05 +0000 |
commit | b39d87b4b52cfd64a56c152a09bd2bc15588e943 (patch) | |
tree | 70c662fd2b57c2bda5d73ecdea326994cbfc0e2d /buildstream/_artifactcache | |
parent | c31ed138734b2081b6c1c05a6ba59a158ecafab0 (diff) | |
download | buildstream-b39d87b4b52cfd64a56c152a09bd2bc15588e943.tar.gz |
_artifactcache: Fix crash in push_directory() without artifact server
Fixes #708.
Diffstat (limited to 'buildstream/_artifactcache')
-rw-r--r-- | buildstream/_artifactcache/cascache.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py index 3e63608be..ed6d58821 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_artifactcache/cascache.py @@ -365,7 +365,10 @@ class CASCache(ArtifactCache): Raises: ArtifactError if no push remotes are configured. """ - push_remotes = [r for r in self._remotes[project] if r.spec.push] + if self._has_push_remotes: + push_remotes = [r for r in self._remotes[project] if r.spec.push] + else: + push_remotes = [] if not push_remotes: raise ArtifactError("CASCache: push_directory was called, but no remote artifact " + |