From 445840586f57435492addea5083449147a74a279 Mon Sep 17 00:00:00 2001 From: Valentin Valls Date: Sun, 29 Mar 2026 13:27:03 +0200 Subject: [PATCH] Fixed byte compare --- lang/py/avro/ipc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/py/avro/ipc.py b/lang/py/avro/ipc.py index 20554d4b1de..3562c33c6bf 100644 --- a/lang/py/avro/ipc.py +++ b/lang/py/avro/ipc.py @@ -405,14 +405,14 @@ def read_framed_message(self): return b"".join(message) while buffer.tell() < buffer_length: chunk = self.reader.read(buffer_length - buffer.tell()) - if chunk == "": + if chunk == b"": raise avro.errors.ConnectionClosedException("Reader read 0 bytes.") buffer.write(chunk) message.append(buffer.getvalue()) def _read_buffer_length(self): read = self.reader.read(BUFFER_HEADER_LENGTH) - if read == "": + if read == b"": raise avro.errors.ConnectionClosedException("Reader read 0 bytes.") return BIG_ENDIAN_INT_STRUCT.unpack(read)[0]