Skip to content

Commit 847879a

Browse files
committed
ENH: Handle PBSPro message when job completed
1 parent c13f967 commit 847879a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nipype/pipeline/plugins/pbs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@ def _is_pending(self, taskid):
4949
environ=dict(os.environ),
5050
terminal_output='allatonce',
5151
ignore_exception=True).run()
52+
stderr = result.runtime.stderr
5253
errmsg = 'Unknown Job Id' # %s' % taskid
53-
return errmsg not in result.runtime.stderr
54+
success = 'Job has finished'
55+
if success in e: # Fix for my PBS
56+
return False
57+
else:
58+
return errmsg not in e
5459

5560
def _submit_batchtask(self, scriptfile, node):
5661
cmd = CommandLine('qsub', environ=dict(os.environ),

0 commit comments

Comments
 (0)