From ebe145eb37e885cb12f4d868dff08c0c27acd136 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 22 Nov 2024 20:10:34 -0300 Subject: [PATCH] FATExtractor: Code style changes --- biostools/extractors.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/biostools/extractors.py b/biostools/extractors.py index e0efd80..697a0f1 100644 --- a/biostools/extractors.py +++ b/biostools/extractors.py @@ -1318,7 +1318,7 @@ class FATExtractor(ArchiveExtractor): if not self._is_fat(file_header): # Check for 20-byte Unisys header followed by FAT filesystem. # Only 4 samples (from the Aquanta line) were found, the header is identical across all of them. - if file_header[:20] == b'\x1a\x12\x34\x1a\x0e\x00\x00\x01\x01\x00\x04\x00\x02\x00\x12\x00\x02\x00\x50\x00' and self._is_fat(file_header[20:]): + if file_header[:20] == b'\x1A\x12\x34\x1A\x0E\x00\x00\x01\x01\x00\x04\x00\x02\x00\x12\x00\x02\x00\x50\x00' and self._is_fat(file_header[20:]): self.debug_print('Unisys header found') return self._extract_payload(file_path, dest_dir, 20, 'unisys.bin') @@ -1335,11 +1335,11 @@ class FATExtractor(ArchiveExtractor): return False # Inject the 55 AA signature (expected by 7-Zip) on images that don't have it. - if file_header[0x1fe:0x200] != b'\x55\xaa': + if file_header[510:512] != b'\x55\xAA': try: with open(file_path, 'r+b') as f: - f.seek(0x1fe) - f.write(b'\x55\xaa') + f.seek(510) + f.write(b'\x55\xAA') except: pass