Merge pull request #416 from Schrolli91/patch-csv

Refactoring RegEx
This commit is contained in:
Bastian Schroll 2019-10-23 11:20:47 +02:00 committed by GitHub
commit a5b4a4a889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -9,6 +9,7 @@
##### Deprecated
##### Removed
##### Fixed
- Description-List: Buchstaben in FMS-Kennungen werden nun erkannt und zugelassen [#409](https://github.com/Schrolli91/BOSWatch/issues/409)
##### Security

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