From a709bbca49c3e748dc049eac9f6037b6d75965d3 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 12 Jan 2023 21:18:15 -0300 Subject: [PATCH] AMIAnalyzer: Fix this one weird pre-Color with MSB set on entrypoint date --- biostools/analyzers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/biostools/analyzers.py b/biostools/analyzers.py index 1d7a962..fb2fad7 100644 --- a/biostools/analyzers.py +++ b/biostools/analyzers.py @@ -331,7 +331,8 @@ class AMIAnalyzer(Analyzer): super().__init__('AMI', *args, **kwargs) self._check_pattern = re.compile(b'''American Megatrends Inc|AMIBIOSC| Access Methods Inc\\.|AMI- ([0-9]{2}/[0-9]{2}/[0-9]{2}) (?:IBM is a TM of IBM|[\\x00-\\xFF]{2} AMI-[^-]+-BIOS )''') - self._date_pattern = re.compile(b'''([0-9]{2}/[0-9]{2}/[0-9]{2})[^0-9]''') + # Pre-Color entrypoint date can inexplicably have most significant bit set (two characters on arche_486_1989-1991), part 1 + self._date_pattern = re.compile(b'''([0-9\\xB0-\\xB9]{2}/[0-9\\xB0-\\xB9]{2}/[0-9\\xB0-\\xB9]{2})[^0-9]''') self._uefi_csm_pattern = re.compile('''63-0100-000001-00101111-[0-9]{6}-Chipset-0AAAA000$''') # The "All Rights Reserved" is important to not catch the same header on other files. # "All