Skip to content

Commit 365cae0

Browse files
committed
Added limit of 100 bytes for Bytes debug prints
1 parent d10051b commit 365cae0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kafka/protocol/types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ def decode(cls, data):
9898
raise ValueError('Buffer underrun decoding Bytes')
9999
return value
100100

101+
@classmethod
102+
def repr(cls, value):
103+
return repr(value[:100] + b'...' if len(value) > 100 else b'')
104+
101105

102106
class Boolean(AbstractType):
103107
@classmethod

0 commit comments

Comments
 (0)