# Run the code itself
code = param_dict["CODE"]
- cmd = "runcode.py {code} -w {wrkdir} {steering_filepath} -s" \
+ cmd = "runcode.py {code} -w {wrkdir} {steering_filepath} -s " \
.format(code=code,
wrkdir=wrkdir,
steering_filepath=os.path.basename(steering_filepath))
# Launch the command
logger.debug("Running the following command in salome shell in %s: %s", steering_file_dir, cmd)
try:
- log = subprocess.check_output(cmd, cwd=steering_file_dir, shell=True)
+ log = subprocess.check_output(cmd, cwd=steering_file_dir, stderr=subprocess.STDOUT, shell=True)
passed = True
log = log.decode('utf-8')
except subprocess.CalledProcessError as e:
passed = False
- log = str(e)
+ log = str(e)+"\n"+e.output.decode('utf-8')
return passed, log