use sys.exit() instead of the removed error() function

This commit is contained in:
Axel Kohlmeyer
2019-01-14 14:13:40 -05:00
parent 59559f74e6
commit c3a15e221d
5 changed files with 16 additions and 13 deletions

View File

@ -73,8 +73,9 @@ homepath = fullpath('.')
homedir = "%s/%s" % (homepath,tardir)
if (pathflag):
if not os.path.isdir(mscgpath): error("MS-CG path does not exist")
homedir = mscgpath
if not os.path.isdir(mscgpath):
sys.exit("MS-CG path %s does not exist" % mscgpath)
homedir = fullpath(mscgpath)
# download and unpack MS-CG tarfile
@ -104,7 +105,7 @@ if buildflag:
cmd = 'cd "%s/src"; cp ../../Makefile.%s .; make -f Makefile.%s' % \
(homedir,msuffix,msuffix)
else:
error("Cannot find Makefile.%s" % msuffix)
sys.exit("Cannot find Makefile.%s" % msuffix)
try:
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
print(txt.decode('UTF-8'))