From 847879ada4d80bc63ea2bd1946184c0b443c7142 Mon Sep 17 00:00:00 2001 From: gjcooper Date: Thu, 25 May 2017 16:10:16 +1000 Subject: [PATCH] ENH: Handle PBSPro message when job completed --- nipype/pipeline/plugins/pbs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nipype/pipeline/plugins/pbs.py b/nipype/pipeline/plugins/pbs.py index 8d58bdebcb..5288bb36cb 100644 --- a/nipype/pipeline/plugins/pbs.py +++ b/nipype/pipeline/plugins/pbs.py @@ -49,8 +49,13 @@ def _is_pending(self, taskid): environ=dict(os.environ), terminal_output='allatonce', ignore_exception=True).run() + stderr = result.runtime.stderr errmsg = 'Unknown Job Id' # %s' % taskid - return errmsg not in result.runtime.stderr + success = 'Job has finished' + if success in e: # Fix for my PBS + return False + else: + return errmsg not in e def _submit_batchtask(self, scriptfile, node): cmd = CommandLine('qsub', environ=dict(os.environ),