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
This commit is contained in:
Florian 2019-10-17 11:01:53 +02:00 committed by GitHub
parent ca26f1dc9a
commit c631692bac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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":