openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #23583
[Merge] lp:~tomasgroth/openlp/bug1299837-2.0 into lp:openlp/2.0
Tomas Groth has proposed merging lp:~tomasgroth/openlp/bug1299837-2.0 into lp:openlp/2.0.
Requested reviews:
Andreas Preikschat (googol)
Related bugs:
Bug #1299837 in OpenLP: "OpenLP crashes when importing songs from EasyWorship"
https://bugs.launchpad.net/openlp/+bug/1299837
For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/bug1299837-2.0/+merge/220308
Fix for bug #1299837, caused by crash when importing EW DB with unexpected data formatting.
--
https://code.launchpad.net/~tomasgroth/openlp/bug1299837-2.0/+merge/220308
Your team OpenLP Core is subscribed to branch lp:openlp/2.0.
=== modified file 'openlp/plugins/songs/lib/ewimport.py'
--- openlp/plugins/songs/lib/ewimport.py 2014-01-14 19:25:18 +0000
+++ openlp/plugins/songs/lib/ewimport.py 2014-05-20 16:21:49 +0000
@@ -188,7 +188,14 @@
self.addAuthor(author_name.strip())
if words:
# Format the lyrics
- result = strip_rtf(words, self.encoding)
+ result = None
+ try:
+ 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:
return
words, self.encoding = result
Follow ups