forked from openlp/openlp
Fix crash when importing EW DB with unexpected data formatting.
bzr-revno: 2194
This commit is contained in:
commit
31d7ec80ae
@ -188,7 +188,14 @@ class EasyWorshipSongImport(SongImport):
|
|||||||
self.addAuthor(author_name.strip())
|
self.addAuthor(author_name.strip())
|
||||||
if words:
|
if words:
|
||||||
# Format the lyrics
|
# Format the lyrics
|
||||||
|
result = None
|
||||||
|
try:
|
||||||
result = strip_rtf(words, self.encoding)
|
result = strip_rtf(words, self.encoding)
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
# The unicode chars in the rtf was not escaped in the expected manner.
|
||||||
|
self.logError(self.title, unicode(translate('SongsPlugin.EasyWorshipSongImport',
|
||||||
|
'Unexpected data formatting.')))
|
||||||
|
continue
|
||||||
if result is None:
|
if result is None:
|
||||||
return
|
return
|
||||||
words, self.encoding = result
|
words, self.encoding = result
|
||||||
|
Loading…
Reference in New Issue
Block a user