Skip to content
Snippets Groups Projects
Commit ed067fb2 authored by Fidel Alfaro Almagro's avatar Fidel Alfaro Almagro :speech_balloon:
Browse files

Improvements in run_command

parent 6b19dd03
No related branches found
No related tags found
No related merge requests found
...@@ -22,10 +22,10 @@ from subprocess import check_output ...@@ -22,10 +22,10 @@ from subprocess import check_output
from fsl import wrappers from fsl import wrappers
def run_command(logger, command, env): def run_command(logger, command, **kwargs):
try: try:
logger.info('COMMAND TO RUN: \t' + command.strip()) logger.info('COMMAND TO RUN: \t' + command.strip())
job_output = check_output(command, shell=True, env=env).decode('UTF-8') job_output = check_output(command,shell=True,**kawargs).decode('UTF-8')
logger.info('COMMAND OUTPUT: \t' + job_output.strip()) logger.info('COMMAND OUTPUT: \t' + job_output.strip())
except Exception as e: except Exception as e:
logger.error('Exception raised during: \t' + command.strip()) logger.error('Exception raised during: \t' + command.strip())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment