mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-03 03:42:35 +01:00
output_processors: Move variable initialization to __init__
In the case of a failure in the initialization of one output_processor the remaining `initialize` methods may not get called causing variables to not be initialized correctly.
This commit is contained in:
@@ -49,6 +49,11 @@ class CsvReportProcessor(OutputProcessor):
|
||||
"""),
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CsvReportProcessor, self).__init__(*args, **kwargs)
|
||||
self.outputs_so_far = []
|
||||
self.artifact_added = False
|
||||
|
||||
def validate(self):
|
||||
super(CsvReportProcessor, self).validate()
|
||||
if self.use_all_classifiers and self.extra_columns:
|
||||
@@ -56,11 +61,6 @@ class CsvReportProcessor(OutputProcessor):
|
||||
'use_all_classifiers is True'
|
||||
raise ConfigError(msg)
|
||||
|
||||
def initialize(self, context):
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
self.outputs_so_far = []
|
||||
self.artifact_added = False
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
def process_job_output(self, output, target_info, run_output):
|
||||
self.outputs_so_far.append(output)
|
||||
|
Reference in New Issue
Block a user