- if( self.finalCommand ):
- print( "[exec] Executing command: " + self.finalCommand )
- os.system( self.finalCommand )
- else:
- raise PostProcessingExecError( "Invalid syntax for --exec post processor" )
+ print("[exec] Executing command: " + self.commandString)
+ self.retCode = subprocess.call(self.commandString, shell=True)
+ if(self.retCode < 0):
+ print("[exec] WARNING: Command exited with a negative return code, the process was killed externally. Your command may not of completed succesfully!")
+ elif(self.verboseOutput):
+ print("[exec] Command exited with return code: " + str(self.retCode))