diff options
-rw-r--r-- | buildstream/_artifactcache/ostreecache.py | 3 | ||||
-rw-r--r-- | buildstream/_artifactcache/pushreceive.py | 4 | ||||
-rw-r--r-- | buildstream/_pipeline.py | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/buildstream/_artifactcache/ostreecache.py b/buildstream/_artifactcache/ostreecache.py index ea93d228a..d0508bd93 100644 --- a/buildstream/_artifactcache/ostreecache.py +++ b/buildstream/_artifactcache/ostreecache.py @@ -327,8 +327,7 @@ class OSTreeCache(ArtifactCache): push_url = url pull_url = initialize_push_connection(url) except PushException as e: - raise ArtifactError("BuildStream did not connect successfully " - "to the shared cache {}: {}".format(url, e)) + raise ArtifactError(e) from e elif url.startswith('/'): push_url = pull_url = 'file://' + url elif url.startswith('file://'): diff --git a/buildstream/_artifactcache/pushreceive.py b/buildstream/_artifactcache/pushreceive.py index 9476c5c81..63adeb153 100644 --- a/buildstream/_artifactcache/pushreceive.py +++ b/buildstream/_artifactcache/pushreceive.py @@ -719,8 +719,8 @@ def initialize_push_connection(remote): # message that reader.receive_info() will have raised. ssh.wait() if ssh.returncode != 0: - ssh_error = ssh.stderr.read().decode('unicode-escape') - raise PushException("SSH error: {}".format(ssh_error)) + ssh_error = ssh.stderr.read().decode('unicode-escape').strip() + raise PushException("{}".format(ssh_error)) else: raise protocol_error diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index baea6c137..015918dc1 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -191,7 +191,7 @@ class Pipeline(): def initialize_remote_caches(self, artifact_cache_specs): def remote_failed(url, error): - self.message(MessageType.WARN, "Failed to fetch remote refs from {}: {}\n".format(url, error)) + self.message(MessageType.WARN, "Failed to fetch remote refs from {}: {}".format(url, error)) with self.timed_activity("Initializing remote caches", silent_nested=True): self.artifacts.set_remotes(artifact_cache_specs, on_failure=remote_failed) |