1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00

fix unsupported archive error (#619)

This commit is contained in:
Alex Xu
2023-11-28 06:53:58 -08:00
committed by GitHub
parent 3090a47f20
commit 6dcaf9a6d1

View File

@@ -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):