Fix for WA import with escaped characters, partial fix for bug 1390986

Fixes: https://launchpad.net/bugs/1390986
This commit is contained in:
Tomas Groth 2014-11-10 10:25:31 +01:00
parent bf382863d2
commit 0a500eeb8d

View File

@ -93,7 +93,7 @@ class WorshipAssistantImport(SongImport):
details = chardet.detect(detect_content) details = chardet.detect(detect_content)
detect_file.close() detect_file.close()
songs_file = open(self.import_source, 'r', encoding=details['encoding']) songs_file = open(self.import_source, 'r', encoding=details['encoding'])
songs_reader = csv.DictReader(songs_file) songs_reader = csv.DictReader(songs_file, escapechar='\\')
try: try:
records = list(songs_reader) records = list(songs_reader)
except csv.Error as e: except csv.Error as e:
@ -119,7 +119,6 @@ class WorshipAssistantImport(SongImport):
self.title = record['TITLE'] self.title = record['TITLE']
if record['AUTHOR'] != EMPTY_STR: if record['AUTHOR'] != EMPTY_STR:
self.parse_author(record['AUTHOR']) self.parse_author(record['AUTHOR'])
print(record['AUTHOR'])
if record['COPYRIGHT'] != EMPTY_STR: if record['COPYRIGHT'] != EMPTY_STR:
self.add_copyright(record['COPYRIGHT']) self.add_copyright(record['COPYRIGHT'])
if record['CCLINR'] != EMPTY_STR: if record['CCLINR'] != EMPTY_STR: