From 8d75ae19437d65a533c6c12ee3bc067a4c85d35d Mon Sep 17 00:00:00 2001 From: datawhores Date: Thu, 21 Mar 2024 14:10:45 -0500 Subject: [PATCH] make sure tasks is not empty --- ofscraper/actions/scraper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ofscraper/actions/scraper.py b/ofscraper/actions/scraper.py index 4b7f2d8e3..3c0f9a950 100644 --- a/ofscraper/actions/scraper.py +++ b/ofscraper/actions/scraper.py @@ -652,6 +652,8 @@ async def process_task(model_id, username, ele): ) setattr(progress_utils.labelled_layout, "visible", True) final_post_areas.remove("Labels") + if not bool(tasks): + break done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_COMPLETED )