diff --git a/biostools/__main__.py b/biostools/__main__.py index 4f23cc1..2054c92 100644 --- a/biostools/__main__.py +++ b/biostools/__main__.py @@ -127,6 +127,7 @@ def extract_process(queue, abort_flag, dir_number_path, next_dir_number_path, op if not options['debug']: dummy_func = lambda self, *args: None for extractor in file_extractors: + extractor.debug = False extractor.debug_print = dummy_func # Raise exceptions on no space if requested. diff --git a/biostools/extractors.py b/biostools/extractors.py index 51ac1a3..1952beb 100644 --- a/biostools/extractors.py +++ b/biostools/extractors.py @@ -24,6 +24,9 @@ except ImportError: from . import util class Extractor: + def __init__(self): + self.debug = True + def extract(self, file_path, file_header, dest_dir, dest_dir_0): """Extract the given file into one of the destination directories: dest_dir allows extracted files to be reprocessed in the next run, @@ -2375,7 +2378,8 @@ class VMExtractor(ArchiveExtractor): b''', Sydex, Inc\\. All Rights Reserved\\.|''' # IBM Sydex b'''Disk eXPress Self-Extracting Diskette Image|''' # HP DXP b'''(\\x00Diskette Image Decompression Utility\\.\\x00)|''' # NEC in-house - b'''(Copyright Daniel Valot |\\x00ARDI - \\x00)''' # IBM ARDI + b'''(Copyright Daniel Valot |\\x00ARDI - \\x00)|''' # IBM ARDI + b'''(Ready to build distribution image with the following attributes:)''' # Zenith in-house ) self._eti_pattern = re.compile(b'''[0-9\\.\\x00]{10}[0-9]{2}/[0-9]{2}/[0-9]{2}\\x00{2}[0-9]{2}:[0-9]{2}:[0-9]{2}\\x00{3}''') @@ -2438,7 +2442,9 @@ class VMExtractor(ArchiveExtractor): def _run_qemu(self, hdd=None, hdd_snapshot=True, floppy=None, floppy_snapshot=True, vvfat=None, boot='c'): # Build QEMU arguments. - args = [self._qemu_path, '-m', '32', '-display', 'none', '-vga', 'none', '-boot', boot] + args = [self._qemu_path, '-m', '32', '-boot', boot] + if not self.debug: + args += ['-display', 'none', '-vga', 'none'] for drive, drive_snapshot, drive_if in ((floppy, floppy_snapshot, 'floppy'), (hdd, hdd_snapshot, 'ide')): # Don't add this drive if an image was not specified. if not drive: @@ -2490,11 +2496,15 @@ class VMExtractor(ArchiveExtractor): f.write(b'move /y config.old config.sys\r\n') # just in case again (snapshot shouldn't persist changes) elif match.group(3): # ARDI f.write(b'echo.|') + elif match.group(4): # Zenith in-house + f.write(b'a:\r\n') f.write(b'd:' + exe_name.encode('cp437', 'ignore')) if match.group(1): # FastPacket f.write(b' /b a:\r\n') elif match.group(3): # ARDI f.write(b'\r\n') + elif match.group(4): # Zenith in-house + f.write(b'