From 41e9ac08408f377c3dd5b4feebcf6a0996fc4634 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 16 Oct 2023 11:24:32 +0530 Subject: [PATCH] Cleanup simple scraper overseers after recipe download in case any were used by the recipe --- src/calibre/ebooks/conversion/plugins/recipe_input.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/conversion/plugins/recipe_input.py b/src/calibre/ebooks/conversion/plugins/recipe_input.py index 0bc93acd56..9466250e20 100644 --- a/src/calibre/ebooks/conversion/plugins/recipe_input.py +++ b/src/calibre/ebooks/conversion/plugins/recipe_input.py @@ -134,8 +134,12 @@ class RecipeInput(InputFormatPlugin): disabled = getattr(recipe, 'recipe_disabled', None) if disabled is not None: raise RecipeDisabled(disabled) - ro = recipe(opts, log, self.report_progress) - ro.download() + try: + ro = recipe(opts, log, self.report_progress) + ro.download() + finally: + from calibre.scraper.simple import cleanup_overseers + cleanup_overseers() self.recipe_object = ro for key, val in self.recipe_object.conversion_options.items():