From eb719c0457d2e3ec3c1add45df8e6fe832a09fe1 Mon Sep 17 00:00:00 2001 From: Patrick Lipka Date: Sun, 18 Sep 2022 21:01:30 +0200 Subject: [PATCH] Adjusted exit in case of error --- libinstaller.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libinstaller.py b/libinstaller.py index 2ea6cb0..d32db85 100755 --- a/libinstaller.py +++ b/libinstaller.py @@ -155,7 +155,7 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver if (err != 0): print("Error: Download of "+libName+" v."+libVersion+" failed!") print("See "+logfilePath+" for details") - exit + sys.exit(0) # configure library os.chdir(workDir) if (os.path.exists(workDir+"/"+libName+"-"+libVersion)): @@ -173,7 +173,7 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver if (err != 0): print("Error: Configuring of "+libName+" v."+libVersion+" failed!") print("See "+logfilePath+" for details") - exit + sys.exit(1) # build library #buildCommand = lib['build'].replace("$CC",compCC).replace("$CXX",compCXX).replace("$FC",compFC).replace("$INSTALL",instDir).replace("$BUILDTHREADS",buildThreads).split() @@ -203,7 +203,7 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver if (err != 0): print("Error: Building "+libName+" v."+libVersion+" failed!") print("See "+logfilePath+" for details") - exit + sys.exit(1) #install library installCommand = lib['install'].replace("$BUILDTHREADS",buildThreads) @@ -215,7 +215,7 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver if (err != 0): print("Error: Installing "+libName+" v."+libVersion+" failed!") print("See "+logfilePath+" for details") - exit + sys.exit(1) print("Library "+libName+" has been installed successfully!\n")