From 87248503b4a75284aa5a9de92cb18d0462f5c261 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Mon, 19 Feb 2024 11:57:30 -0800 Subject: [PATCH] Allow 7z again --- comicapi/archivers/rar.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/comicapi/archivers/rar.py b/comicapi/archivers/rar.py index 4628bb5..c17bfcf 100644 --- a/comicapi/archivers/rar.py +++ b/comicapi/archivers/rar.py @@ -289,17 +289,13 @@ class RarArchiver(Archiver): orig = rarfile.UNRAR_TOOL rarfile.UNRAR_TOOL = cls.exe try: - return rarfile.is_rarfile(str(path)) and rarfile.tool_setup( - sevenzip=platform.system() == "Windows", sevenzip2=platform.system() == "Windows", force=True - ) + return rarfile.is_rarfile(str(path)) and rarfile.tool_setup(sevenzip=False, sevenzip2=False, force=True) except rarfile.RarCannotExec: rarfile.UNRAR_TOOL = orig # Fallback to standard try: - return rarfile.is_rarfile(str(path)) and rarfile.tool_setup( - sevenzip=platform.system() == "Windows", sevenzip2=platform.system() == "Windows", force=True - ) + return rarfile.is_rarfile(str(path)) and rarfile.tool_setup(force=True) except rarfile.RarCannotExec as e: logger.info(e) return False