diff options
author | Zuul <zuul@review.opendev.org> | 2023-05-17 23:20:30 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-05-17 23:20:30 +0000 |
commit | 4c7b2e3bb573a451ee7b2c0dec9e0a8da9d94129 (patch) | |
tree | 28274904f8ea2a27ed834b91df0755621bc66f3a /swift/obj/ssync_sender.py | |
parent | 667f733cb938ddf5e5f46732463c46d030d0603d (diff) | |
parent | 0a4e41701dbb5795ff4cab7a2c68a41c90bd51e7 (diff) | |
download | swift-master.tar.gz |
Diffstat (limited to 'swift/obj/ssync_sender.py')
-rw-r--r-- | swift/obj/ssync_sender.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swift/obj/ssync_sender.py b/swift/obj/ssync_sender.py index 296600a6a..b132b8b3d 100644 --- a/swift/obj/ssync_sender.py +++ b/swift/obj/ssync_sender.py @@ -266,7 +266,7 @@ class Sender(object): self.daemon.node_timeout, 'connect receive'): response = connection.getresponse() if response.status != http.HTTP_OK: - err_msg = response.read()[:1024] + err_msg = utils.cap_length(response.read(), 1024) raise exceptions.ReplicationException( 'Expected status %s; got %s (%s)' % (http.HTTP_OK, response.status, err_msg)) @@ -358,7 +358,7 @@ class Sender(object): except UnicodeDecodeError: pass raise exceptions.ReplicationException( - 'Unexpected response: %r' % line[:1024]) + 'Unexpected response: %r' % utils.cap_length(line, 1024)) while True: with exceptions.MessageTimeout( self.daemon.http_timeout, 'missing_check line wait'): @@ -447,7 +447,7 @@ class Sender(object): except UnicodeDecodeError: pass raise exceptions.ReplicationException( - 'Unexpected response: %r' % line[:1024]) + 'Unexpected response: %r' % utils.cap_length(line, 1024)) while True: with exceptions.MessageTimeout( self.daemon.http_timeout, 'updates line wait'): @@ -464,7 +464,7 @@ class Sender(object): except UnicodeDecodeError: pass raise exceptions.ReplicationException( - 'Unexpected response: %r' % line[:1024]) + 'Unexpected response: %r' % utils.cap_length(line, 1024)) def send_subrequest(self, connection, method, url_path, headers, df): msg = [b'%s %s' % (method.encode('ascii'), url_path.encode('utf8'))] |