1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

replace exit() with sys.exit() (#590)

This commit is contained in:
Alex Xu
2023-09-08 13:18:32 -07:00
committed by GitHub
parent 424118b7cd
commit 60e9f075b8
6 changed files with 11 additions and 10 deletions

View File

@@ -1105,13 +1105,13 @@ def checkTools(source):
process.communicate()
if process.returncode != 0 and process.returncode != 7:
print('ERROR: 7z is missing!')
exit(1)
sys.exit(1)
if options.format == 'MOBI':
kindleGenExitCode = Popen('kindlegen -locale en', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
kindleGenExitCode.communicate()
if kindleGenExitCode.returncode != 0:
print('ERROR: KindleGen is missing!')
exit(1)
sys.exit(1)
def checkPre(source):

View File

@@ -23,6 +23,7 @@ from hashlib import md5
from html.parser import HTMLParser
from distutils.version import StrictVersion
from re import split
import sys
from traceback import format_tb
@@ -133,4 +134,4 @@ def dependencyCheck(level):
missing.append('Pillow 5.2.0+')
if len(missing) > 0:
print('ERROR: ' + ', '.join(missing) + ' is not installed!')
exit(1)
sys.exit(1)