Layers: Update LeechCore RawIO with better error handling for readlines

Fixes #1419
This commit is contained in:
Mike Auty
2025-01-18 13:18:57 +00:00
parent 0cd1520c92
commit 2fe8ee5983
@@ -129,6 +129,8 @@ if HAS_LEECHCORE:
def readline(self, __size: Optional[int] = ...) -> bytes:
data = b""
if not __size:
__size = 0
while __size > self._chunk_size or __size < 0:
data += self.read(self._chunk_size)
index = data.find(b"\n")