Skip to content

Commit ae65bd6

Browse files
committed
fix: check only the last line in the sge qsub stdout
1 parent 7b44101 commit ae65bd6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/pipeline/plugins/sge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ def _submit_batchtask(self, scriptfile, node):
108108
break
109109
iflogger.setLevel(oldlevel)
110110
# retrieve sge taskid
111-
taskid = int(result.runtime.stdout.split(' ')[2])
111+
lines = [line for line in result.runtime.stdout.split('\n') if line]
112+
taskid = int(lines[-1].split(' ')[2])
112113
self._pending[taskid] = node.output_dir()
113114
logger.debug('submitted sge task: %d for node %s' % (taskid, node._id))
114115
return taskid

0 commit comments

Comments
 (0)