1
0
mirror of https://github.com/ciromattia/kcc synced 2026-01-01 02:49:41 +00:00

Older UnRAR exit code is 7 when it is called without parameters

This commit is contained in:
Paweł Jastrzębski
2013-06-27 18:13:39 +02:00
parent 01f65220ec
commit 118cf25ff7

View File

@@ -422,7 +422,8 @@ class Ui_KCC(object):
self.KindleGen = False
formats = ['EPUB', 'CBZ']
self.addMessage('Cannot find kindlegen in PATH! MOBI creation will be disabled.', 'warning')
if call('unrar', stdout=PIPE, stderr=STDOUT, shell=True) == 0:
rarExitCode = call('unrar', stdout=PIPE, stderr=STDOUT, shell=True)
if rarExitCode == 0 or rarExitCode == 7:
self.UnRAR = True
else:
self.UnRAR = False