mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-22 04:49:00 +00:00
daq: Fixed bug where an exception would be raised if merge_channles=False
This commit is contained in:
parent
9222257d79
commit
09390e7ffb
@ -303,7 +303,8 @@ class Daq(Instrument):
|
|||||||
except ConfigurationError, ex:
|
except ConfigurationError, ex:
|
||||||
raise ConfigError('DAQ configuration: ' + ex.message) # Re-raise as a WA error
|
raise ConfigError('DAQ configuration: ' + ex.message) # Re-raise as a WA error
|
||||||
self.grouped_suffixes = defaultdict(str)
|
self.grouped_suffixes = defaultdict(str)
|
||||||
if isinstance(self.merge_channels, bool) and self.merge_channels:
|
if isinstance(self.merge_chnnels, bool):
|
||||||
|
if self.merge_channels:
|
||||||
# Create a dict of potential prefixes and a list of their suffixes
|
# Create a dict of potential prefixes and a list of their suffixes
|
||||||
grouped_suffixes = {label[:-1]: label for label in sorted(self.labels) if len(label) > 1}
|
grouped_suffixes = {label[:-1]: label for label in sorted(self.labels) if len(label) > 1}
|
||||||
# Only merge channels if more than one channel has the same prefix and the prefixes
|
# Only merge channels if more than one channel has the same prefix and the prefixes
|
||||||
@ -323,7 +324,7 @@ class Daq(Instrument):
|
|||||||
self.label_map = self.merge_channels # pylint: disable=redefined-variable-type
|
self.label_map = self.merge_channels # pylint: disable=redefined-variable-type
|
||||||
self.merge_channels = True
|
self.merge_channels = True
|
||||||
else: # Should never reach here
|
else: # Should never reach here
|
||||||
raise AssertionError("Merge files is of invalid type")
|
raise AssertionError("``merge_channels`` is of invalid type")
|
||||||
|
|
||||||
def before_overall_results_processing(self, context):
|
def before_overall_results_processing(self, context):
|
||||||
if self._results:
|
if self._results:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user