Skip to content

Commit

Permalink
fsl.check_first() fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lestropie committed Mar 22, 2023
1 parent 0703abe commit 18e5910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mrtrix3/fsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ def check_first(prefix, structures=None, first_stdout=None): #pylint: disable=un
job_id = None
if first_stdout:
try:
job_id = int(first_stdout)
job_id = int(first_stdout.rstrip().splitlines()[-1])
except ValueError:
app.debug('Unable to convert FIRST stdout contents to integer job ID')
execution_verified = False
if job_id:
# Eventually modify on dev to reflect Python3 prerequisite
try:
return_code = subprocess.call('fsl_sub', '-j', str(job_id))
return_code = subprocess.call(['fsl_sub', '-j', str(job_id)])
if return_code:
app.debug('fsl_sub executed successfully, but returned error code ' + str(return_code))
else:
Expand Down

0 comments on commit 18e5910

Please sign in to comment.