mirror of https://github.com/scrapy/scrapy.git
Fix BytesIO non-emptiness check
This commit is contained in:
parent
8a73c6c90c
commit
a113208a06
|
|
@ -23,7 +23,7 @@ def gunzip(data: bytes, *, max_size: int = 0) -> bytes:
|
|||
# complete only if there is some data, otherwise re-raise
|
||||
# see issue 87 about catching struct.error
|
||||
# some pages are quite small so output_stream is empty
|
||||
if output_stream:
|
||||
if output_stream.getbuffer().nbytes > 0:
|
||||
break
|
||||
raise
|
||||
decompressed_size += len(chunk)
|
||||
|
|
|
|||
Loading…
Reference in New Issue