diff --git a/ingest/parsers.py b/ingest/parsers.py index 3cd419d..9789750 100644 --- a/ingest/parsers.py +++ b/ingest/parsers.py @@ -184,7 +184,8 @@ class StreamingEnvelopeParser: should_be_empty = io.BytesIO() self.remainder, self.at_eof = readuntil( self.input_stream, self.remainder, NewlineFinder(), should_be_empty, self.chunk_size) - if should_be_empty.getvalue() != b"": + should_be_empty_value = should_be_empty.getvalue() + if should_be_empty_value != b"": raise ParseError("Item with explicit length not terminated by newline/EOF") yield item_headers, item_output_stream