From 456763cda3cb5f2d7527c3de2a7addb0086799bf Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Wed, 26 Jan 2022 21:52:06 -0300 Subject: [PATCH] Improve Phoenix Core detection --- biostools/analyzers.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/biostools/analyzers.py b/biostools/analyzers.py index d10b9ba..10385b0 100644 --- a/biostools/analyzers.py +++ b/biostools/analyzers.py @@ -1806,25 +1806,21 @@ class PhoenixAnalyzer(Analyzer): return True def _version_core(self, line, match): - '''^Phoenix (cME|[A-Za-z]+Core)(?:\(tm\))? (?!Setup)([^\s]+)?''' + '''Phoenix ((?:[A-Za-z]+Core|cME).+)''' - # Extract the first word. - self.version = match.group(1) + # Skip setup headers. + branch = match.group(1) + if ' Setup' in branch: + return False - # Extract the second word. - second_word = match.group(2) - if second_word: - if second_word == 'SVR': - second_word = 'Server' - self.version += ' ' + second_word - - # Mark this as a Core BIOS for sign-on extraction. - self._is_core = True + # Extract branch, while removing extraneous trademark + # symbols and changing the Server abbreviation. + self.version = branch.replace('(tm)', '').replace('SVR', 'Server') return True def _version_grid(self, line, match): - '''Copyright (C) 1987-1991, GRiD Systems Corp.All Rights Reserved''' + '''Copyright (C) [0-9-]+, GRiD Systems Corp.All Rights Reserved''' # This is a GRiD BIOS. if not self.version: