Commit 8fcdaac5 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

fix a bug with errors handling

parent ab7f71e9
......@@ -429,9 +429,9 @@ class Workflow(threading.Thread):
return gr
def delete(self):
if self.get_status() in [self.STATUS_COMPLETED, self.STATUS_FAILED, self.STATUS_ABORTED]:
# first close the open files
if self.get_status() in [self.STATUS_COMPLETED, self.STATUS_FAILED, self.STATUS_ABORTED]:
......@@ -951,10 +951,12 @@ class Workflow(threading.Thread):
if not keep_same_error_file:
if hasattr(self, "stderr") and self.stderr is not None:
os.rename( self.stderr, os.path.join(, str(time.time()) + self.STDERR_FILE_NAME + self.OLD_EXTENSION) )
stderr = os.path.join(, self.STDERR_FILE_NAME)
logger = logging.getLogger( "wf." + str( )
formatter = logging.Formatter( '## %(asctime)s :: %(message)s' )
if self.stderrfh is not None:
self.stderrfh = FileHandler(stderr, 'a')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment