Skip to content

Commit cba1f5a

Browse files
author
Chad Cumba
committed
Fixed a typecasting bug on some systems
strict python interp was killing o.find(<int>). typecasted to str.
1 parent 917b5aa commit cba1f5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nipype/pipeline/plugins/slurm.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def _is_pending(self, taskid):
5252
stdout=subprocess.PIPE,
5353
stderr=subprocess.PIPE)
5454
o, _ = proc.communicate()
55-
return o.find(taskid) > -1
55+
56+
return o.find(str(taskid)) > -1
5657

5758
def _submit_batchtask(self, scriptfile, node):
5859
"""
@@ -113,7 +114,7 @@ def _submit_batchtask(self, scriptfile, node):
113114
else:
114115
break
115116
iflogger.setLevel(oldlevel)
116-
# retrieve sge taskid
117+
# retrieve taskid
117118
lines = [line for line in result.runtime.stdout.split('\n') if line]
118119
taskid = int(re.match("Submitted batch job ([0-9]*)",
119120
lines[-1]).groups()[0])

0 commit comments

Comments
 (0)