From c631692bac16a6eb4079035d3f74d0ecb1eacc30 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 17 Oct 2019 11:01:53 +0200 Subject: [PATCH] Refactoring RegEx Changing RegEx to check entry; FMS containing chars inbetween had not been loaded, so the RegEx (l. 46) has been changed to correct it. Also: removing semicolon in l 105 --- includes/descriptionList.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/descriptionList.py b/includes/descriptionList.py index 9e548fd..c61a46e 100644 --- a/includes/descriptionList.py +++ b/includes/descriptionList.py @@ -43,7 +43,7 @@ def loadCSV(typ, idField): for row in reader: logging.debug(row) # only import rows with an integer as id, allow subrics though - if re.match("^[0-9]+[A-D]?$", row[idField], re.IGNORECASE): + if re.match("^[0-9A-Fa-f]+$", row[idField], re.IGNORECASE): try: resultList[row[idField].lower()] = stringConverter.convertToUTF8(row['description']) except: @@ -102,7 +102,7 @@ def getDescription(typ, data): @return: description as string """ - resultStr = data; + resultStr = data logging.debug("look up description lists") try: if typ == "FMS":