summaryrefslogtreecommitdiff
path: root/swift/obj/ssync_receiver.py
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-05-17 23:20:30 +0000
committerGerrit Code Review <review@openstack.org>2023-05-17 23:20:30 +0000
commit4c7b2e3bb573a451ee7b2c0dec9e0a8da9d94129 (patch)
tree28274904f8ea2a27ed834b91df0755621bc66f3a /swift/obj/ssync_receiver.py
parent667f733cb938ddf5e5f46732463c46d030d0603d (diff)
parent0a4e41701dbb5795ff4cab7a2c68a41c90bd51e7 (diff)
downloadswift-4c7b2e3bb573a451ee7b2c0dec9e0a8da9d94129.tar.gz
Merge "Add cap_length helper"HEADmaster
Diffstat (limited to 'swift/obj/ssync_receiver.py')
-rw-r--r--swift/obj/ssync_receiver.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/swift/obj/ssync_receiver.py b/swift/obj/ssync_receiver.py
index 1ee0713ff..fb125fca2 100644
--- a/swift/obj/ssync_receiver.py
+++ b/swift/obj/ssync_receiver.py
@@ -388,7 +388,8 @@ class Receiver(object):
raise SsyncClientDisconnected
if line.strip() != b':MISSING_CHECK: START':
raise Exception(
- 'Looking for :MISSING_CHECK: START got %r' % line[:1024])
+ 'Looking for :MISSING_CHECK: START got %r'
+ % utils.cap_length(line, 1024))
object_hashes = []
nlines = 0
while True:
@@ -450,7 +451,8 @@ class Receiver(object):
# Guess they hung up waiting for us to process the missing check
raise SsyncClientDisconnected
if line.strip() != b':UPDATES: START':
- raise Exception('Looking for :UPDATES: START got %r' % line[:1024])
+ raise Exception('Looking for :UPDATES: START got %r'
+ % utils.cap_length(line, 1024))
successes = 0
failures = 0
updates = 0