diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2018-01-15 15:25:35 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-01-16 08:24:26 +0100 |
commit | bc0f6cd53403bcf487b8fbc42905a33bac618e42 (patch) | |
tree | c2fd329bb6a157401c34e1e7f3c3aedaee26c31a /buildstream/_artifactcache/pushreceive.py | |
parent | fc48f087c918231bbad7f80206b1f85e7acf8d8a (diff) | |
download | buildstream-bc0f6cd53403bcf487b8fbc42905a33bac618e42.tar.gz |
Shorten the warnings raised when remote cache initialization fails
Before:
[--:--:--] WARNING Failed to fetch remote refs from ssh://ostree@ostree.baserock.org:22000/cache: BuildStream did not connect successfully to the shared cache ssh://ostree@ostree.baserock.org:22000/cache: SSH error: ssh: connect to host ostree.baserock.org port 22000: Connection refused
After:
[--:--:--] WARNING Failed to fetch remote refs from ssh://ostree@ostree.baserock.org:22000/cache. ssh: connect to host ostree.baserock.org port 22000: Connection refused
Diffstat (limited to 'buildstream/_artifactcache/pushreceive.py')
-rw-r--r-- | buildstream/_artifactcache/pushreceive.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |