1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-15 18:56:28 +00:00

Tweaked KindleGen handling

This commit is contained in:
Paweł Jastrzębski
2016-01-03 19:15:31 +01:00
parent 04cf732d50
commit 4079314b61

View File

@@ -1230,7 +1230,6 @@ def makeMOBIWorker(item):
kindlegenError = '' kindlegenError = ''
try: try:
if os.path.getsize(item) < 629145600: if os.path.getsize(item) < 629145600:
print("Creating MOBI file...")
output = Popen('kindlegen -dont_append_source -locale en "' + item + '"', output = Popen('kindlegen -dont_append_source -locale en "' + item + '"',
stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=False) stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=False)
for line in output.stdout: for line in output.stdout:
@@ -1244,7 +1243,7 @@ def makeMOBIWorker(item):
kindlegenErrorCode = 23026 kindlegenErrorCode = 23026
if kindlegenErrorCode > 0: if kindlegenErrorCode > 0:
break break
if "Mobi file built successfully" in line: if ":I1036: Mobi file built successfully" in line:
output.terminate() output.terminate()
else: else:
# ERROR: EPUB too big # ERROR: EPUB too big