summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-10-15 11:48:16 +0000
committerJürg Billeter <j@bitron.ch>2018-10-15 11:48:16 +0000
commit4e3ec89e95955eb3605b7e50b8a35183bbd42be6 (patch)
tree70c662fd2b57c2bda5d73ecdea326994cbfc0e2d
parentc31ed138734b2081b6c1c05a6ba59a158ecafab0 (diff)
parentb39d87b4b52cfd64a56c152a09bd2bc15588e943 (diff)
downloadbuildstream-4e3ec89e95955eb3605b7e50b8a35183bbd42be6.tar.gz
Merge branch 'juerg/remote-config' into 'master'
_artifactcache: Fix crash in push_directory() without artifact server Closes #708 See merge request BuildStream/buildstream!871
-rw-r--r--buildstream/_artifactcache/cascache.py5
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 " +