mirror of
https://github.com/ciromattia/kcc
synced 2025-12-23 14:41:47 +00:00
fix unsupported archive error (#619)
This commit is contained in:
@@ -46,11 +46,7 @@ class ComicArchive:
|
|||||||
self.type = line.rstrip().split(' ')[1].upper()
|
self.type = line.rstrip().split(' ')[1].upper()
|
||||||
break
|
break
|
||||||
if process.returncode != 0:
|
if process.returncode != 0:
|
||||||
raise OSError('Archive is corrupted or encrypted.')
|
raise OSError(process.stdout.strip())
|
||||||
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.')
|
|
||||||
|
|
||||||
def extract(self, targetdir):
|
def extract(self, targetdir):
|
||||||
if not os.path.isdir(targetdir):
|
if not os.path.isdir(targetdir):
|
||||||
|
|||||||
Reference in New Issue
Block a user