From 7364d4962f7b70aa9f2536a2c347269e402a9a29 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Mon, 30 Jun 2014 09:18:26 +0200 Subject: [PATCH] Small fixes --- openlp/plugins/songs/lib/worshipassistantimport.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openlp/plugins/songs/lib/worshipassistantimport.py b/openlp/plugins/songs/lib/worshipassistantimport.py index 6831ec450..772fe8622 100644 --- a/openlp/plugins/songs/lib/worshipassistantimport.py +++ b/openlp/plugins/songs/lib/worshipassistantimport.py @@ -93,7 +93,6 @@ class WorshipAssistantImport(SongImport): details = chardet.detect(detect_content) detect_file.close() songs_file = open(self.import_source, 'r', encoding=details['encoding']) - songs_reader = csv.DictReader(songs_file) try: records = list(songs_reader) @@ -109,7 +108,7 @@ class WorshipAssistantImport(SongImport): if self.stop_import_flag: return # Ensure that all keys are uppercase - record = dict((k.upper(), v) for k, v in record.items()) + record = dict((field.upper(), value) for field, value in record.items()) # The CSV file has a line in the middle of the file where the headers are repeated. # We need to skip this line. if record['TITLE'] == "TITLE" and record['AUTHOR'] == 'AUTHOR' and record['LYRICS2'] == 'LYRICS2':