From ec722505ae46daca6704529376259d42c781f9ee Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 21 Nov 2023 20:38:18 -0300 Subject: [PATCH] MylexAnalyzer: Update to use metadata --- biostools/analyzers.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/biostools/analyzers.py b/biostools/analyzers.py index b10262f..297f188 100644 --- a/biostools/analyzers.py +++ b/biostools/analyzers.py @@ -1914,7 +1914,7 @@ class MylexAnalyzer(Analyzer): def __init__(self, *args, **kwargs): super().__init__('Mylex', *args, **kwargs) - self._version_pattern = re.compile(b'''MYLEX ([\\x20-\\x7E]+) BIOS Version ([\\x20-\\x7E]+) ([0-9]{2}/[0-9]{2}/[0-9]{2})''') + self._version_pattern = re.compile(b'''MYLEX [\\x20-\\x7E]+ BIOS Version ([\\x20-\\x7E]+) ([0-9]{2}/[0-9]{2}/[0-9]{2})''') def can_handle(self, file_path, file_data, header_data): # Determine location of the identification block. @@ -1923,13 +1923,13 @@ class MylexAnalyzer(Analyzer): return False # Extract version. - self.version = match.group(2).decode('cp437', 'ignore') + self.version = match.group(1).decode('cp437', 'ignore') # Extract date as a string. - self.string = match.group(3).decode('cp437', 'ignore') + self.string = match.group(2).decode('cp437', 'ignore') - # Extract board name as a sign-on. - self.signon = match.group(1).decode('cp437', 'ignore') + # Extract full version string as metadata. + self.metadata.append(('ID', match.group(0).decode('cp437', 'ignore'))) return True