rename 'StopExtraction' to 'AbortExtraction'

for cases where StopExtraction was used to report errors
This commit is contained in:
Mike Fährmann
2025-07-09 21:07:28 +02:00
parent f17ed0569a
commit d8ef1d693f
57 changed files with 149 additions and 156 deletions

View File

@@ -112,10 +112,10 @@ class MangadexChapterExtractor(MangadexExtractor):
data = self._transform(chapter)
if data.get("_external_url") and not data["count"]:
raise exception.StopExtraction(
"Chapter %s%s is not available on MangaDex and can instead be "
"read on the official publisher's website at %s.",
data["chapter"], data["chapter_minor"], data["_external_url"])
raise exception.AbortExtraction(
f"Chapter {data['chapter']}{data['chapter_minor']} is not "
f"available on MangaDex and can instead be read on the "
f"official publisher's website at {data['_external_url']}.")
yield Message.Directory, data
@@ -356,8 +356,8 @@ class MangadexAPI():
msg = ", ".join('{title}: "{detail}"'.format_map(error)
for error in response.json()["errors"])
raise exception.StopExtraction(
"%s %s (%s)", response.status_code, response.reason, msg)
raise exception.AbortExtraction(
f"{response.status_code} {response.reason} ({msg})")
def _pagination_chapters(self, endpoint, params=None, auth=False):
if params is None: