From 418411e09cfd4dd97e3ec2e1aa7d0c175ec6fdd7 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 28 Apr 2017 23:49:44 +0200 Subject: [PATCH] Converting everything to lowercase Ignore upper- or lowercase from csv-file - as the code translates to lowercase in poc.csv all entries will be switched to lowercase. --- includes/descriptionList.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/descriptionList.py b/includes/descriptionList.py index e9252b3..fba47f1 100644 --- a/includes/descriptionList.py +++ b/includes/descriptionList.py @@ -45,6 +45,10 @@ def loadCSV(typ, idField): # only import rows with an integer as id, allow subrics though if re.match("^[0-9]+[A-D]?$", row[idField], re.IGNORECASE): try: + if len(row[idField]) > 7: + if row[idField][7].isupper(): + tmp = row[idField].lower() + row[idField] = tmp; resultList[row[idField]] = stringConverter.convertToUTF8(row['description']) except: # skip entry in case of an exception