mirror of
https://github.com/flibusta-apps/books_downloader.git
synced 2025-12-06 15:05:37 +01:00
Fix result file reading
This commit is contained in:
@@ -275,7 +275,7 @@ class FLDownloader(BaseDownloader):
|
|||||||
|
|
||||||
async def _content_iterator() -> AsyncIterator[bytes]:
|
async def _content_iterator() -> AsyncIterator[bytes]:
|
||||||
try:
|
try:
|
||||||
async with aiofiles.open(content_filename) as temp_file:
|
async with aiofiles.open(content_filename, "rb") as temp_file:
|
||||||
while chunk := await temp_file.read(2048):
|
while chunk := await temp_file.read(2048):
|
||||||
yield cast(bytes, chunk)
|
yield cast(bytes, chunk)
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Reference in New Issue
Block a user