From 4d2b9e1157db520d49a81d81562d7b4c55120cb4 Mon Sep 17 00:00:00 2001 From: Mizaki Date: Fri, 1 Dec 2023 14:09:17 +0000 Subject: [PATCH] Warn on bad min ct required verion and use anyway. Use clearer log messages --- comictalker/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/comictalker/__init__.py b/comictalker/__init__.py index 11eff4b..c2f92f8 100644 --- a/comictalker/__init__.py +++ b/comictalker/__init__.py @@ -37,10 +37,15 @@ def get_talkers(version: str, cache: pathlib.Path) -> dict[str, ComicTalker]: talkers[talker.name] = obj else: logger.error( - f"CT minimum required version not met for talker: {talker.name} with version: {obj.comictagger_min_ver}" + f"Minimum ComicTagger version required of {obj.comictagger_min_ver} for talker {talker.name} is not met, will NOT load talker" ) except InvalidVersion: - logger.error(f"Invalid version number for talker: {talker.name} - version: {obj.comictagger_min_ver}") + logger.warning( + f"Invalid minimum required ComicTagger version number for talker: {talker.name} - version: {obj.comictagger_min_ver}, will load talker anyway" + ) + # Attempt to use the talker anyway + # TODO flag this problem for later display to the user + talkers[talker.name] = obj except Exception: logger.exception("Failed to load talker: %s", talker.name)