From 6dcaf9a6d1ea6cfd8ac97cdf763d435c8b1ee062 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Tue, 28 Nov 2023 06:53:58 -0800 Subject: [PATCH] fix unsupported archive error (#619) --- kindlecomicconverter/comicarchive.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kindlecomicconverter/comicarchive.py b/kindlecomicconverter/comicarchive.py index c8a313c..9fd05b8 100644 --- a/kindlecomicconverter/comicarchive.py +++ b/kindlecomicconverter/comicarchive.py @@ -46,11 +46,7 @@ class ComicArchive: self.type = line.rstrip().split(' ')[1].upper() break if process.returncode != 0: - raise OSError('Archive is corrupted or encrypted.') - elif self.type not in ['7Z', 'RAR', 'RAR5', 'ZIP']: - raise OSError('Unsupported archive format.') - elif self.type not in ['7Z', 'RAR', 'RAR5', 'ZIP']: - raise OSError('Unsupported archive format.') + raise OSError(process.stdout.strip()) def extract(self, targetdir): if not os.path.isdir(targetdir):