diff options
author | Paweł Jastrzębski <pawelj@iosphe.re> | 2019-03-06 20:12:11 +0100 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@iosphe.re> | 2019-03-06 20:12:11 +0100 |
commit | 535c2c220bfa303fd2b760843d3e5ba86358e356 (patch) | |
tree | f0f4ce6e024c097e8bab349bc6933cc46adc230e /kindlecomicconverter/comicarchive.py | |
parent | Bye, bye DEBs (diff) | |
download | kcc-535c2c220bfa303fd2b760843d3e5ba86358e356.tar.gz kcc-535c2c220bfa303fd2b760843d3e5ba86358e356.tar.bz2 kcc-535c2c220bfa303fd2b760843d3e5ba86358e356.zip |
Added RAR5 support
Diffstat (limited to '')
-rw-r--r-- | kindlecomicconverter/comicarchive.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kindlecomicconverter/comicarchive.py b/kindlecomicconverter/comicarchive.py index 214ae8d..435a99c 100644 --- a/kindlecomicconverter/comicarchive.py +++ b/kindlecomicconverter/comicarchive.py @@ -40,7 +40,7 @@ class ComicArchive: process.communicate() if process.returncode != 0: raise OSError('Archive is corrupted or encrypted.') - elif self.type not in ['7Z', 'RAR', 'ZIP']: + elif self.type not in ['7Z', 'RAR', 'RAR5', 'ZIP']: raise OSError('Unsupported archive format.') def extract(self, targetdir): @@ -61,7 +61,7 @@ class ComicArchive: return targetdir def addFile(self, sourcefile): - if self.type == 'RAR': + if self.type in ['RAR', 'RAR5']: raise NotImplementedError process = Popen('7z a -y "' + self.filepath + '" "' + sourcefile + '"', stdout=PIPE, stderr=STDOUT, shell=True) |