mirror of
https://github.com/86Box/bios-tools.git
synced 2026-02-25 04:45:32 -07:00
MylexAnalyzer: Update to use metadata
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user