From 9bb34081b01471971ff255f6cd74d651f5800b6c Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 14 Apr 2023 12:02:14 -0300 Subject: [PATCH] BonusAnalyzer: Deduplicate DMI board and system tables with identical information --- biostools/analyzers.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/biostools/analyzers.py b/biostools/analyzers.py index 5eae5c8..febe158 100644 --- a/biostools/analyzers.py +++ b/biostools/analyzers.py @@ -1234,7 +1234,13 @@ class BonusAnalyzer(Analyzer): continue board_mfg, board_product, board_version = candidate - dmi_tables.append('[Board] {0} {1} {2}'.format(board_mfg, board_product, board_version)) + + # Check for duplicate system and baseboard information. + formatted = '{0} {1} {2}'.format(board_mfg, board_product, board_version) + if len(dmi_tables) > 0 and dmi_tables[-1] == ('[System] ' + formatted): + dmi_tables[-1] = '[Board/System] ' + formatted + else: + dmi_tables.append('[Board] ' + formatted) break for match in self._dmi_processor_pattern.finditer(file_data): # SMBIOS Type 4: Processor