Merge lp:~phill-ridout/openlp/bug1098075_2.0 into lp:openlp/2.0

Proposed by Phill
Status: Superseded
Proposed branch: lp:~phill-ridout/openlp/bug1098075_2.0
Merge into: lp:openlp/2.0
Diff against target: 63 lines (+16/-4)
4 files modified
openlp/plugins/songs/lib/__init__.py (+4/-1)
openlp/plugins/songs/lib/ewimport.py (+4/-1)
openlp/plugins/songs/lib/songproimport.py (+4/-1)
openlp/plugins/songs/lib/sundayplusimport.py (+4/-1)
To merge this branch: bzr merge lp:~phill-ridout/openlp/bug1098075_2.0
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Review via email: mp+146321@code.launchpad.net

This proposal has been superseded by a proposal from 2013-02-03.

Description of the change

Fixes bug 1098075 by returning None as requested by Raoul. Now for the correct target branch.

To post a comment you must log in.
Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Looks alright to me. I probably would have named the return value "result", but that's neither here nor there.

review: Approve
2133. By Phill

changed variables to result

2134. By Phill

Reduced some code

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openlp/plugins/songs/lib/__init__.py'
--- openlp/plugins/songs/lib/__init__.py 2012-12-30 19:41:24 +0000
+++ openlp/plugins/songs/lib/__init__.py 2013-02-03 20:19:19 +0000
@@ -581,7 +581,10 @@
581 try:581 try:
582 encoding, default_encoding = get_encoding(font, 582 encoding, default_encoding = get_encoding(font,
583 font_table, default_encoding, failed=failed)583 font_table, default_encoding, failed=failed)
584 out.append(chr(charcode).decode(encoding))584 if encoding:
585 out.append(chr(charcode).decode(encoding))
586 else:
587 return None
585 except UnicodeDecodeError:588 except UnicodeDecodeError:
586 failed = True589 failed = True
587 else:590 else:
588591
=== modified file 'openlp/plugins/songs/lib/ewimport.py'
--- openlp/plugins/songs/lib/ewimport.py 2012-12-30 19:41:24 +0000
+++ openlp/plugins/songs/lib/ewimport.py 2013-02-03 20:19:19 +0000
@@ -180,7 +180,10 @@
180 self.addAuthor(author_name.strip())180 self.addAuthor(author_name.strip())
181 if words:181 if words:
182 # Format the lyrics182 # Format the lyrics
183 words, self.encoding = strip_rtf(words, self.encoding)183 words = strip_rtf(words, self.encoding)
184 if words is None:
185 return
186 words, self.encoding = words
184 verse_type = VerseType.Tags[VerseType.Verse]187 verse_type = VerseType.Tags[VerseType.Verse]
185 for verse in SLIDE_BREAK_REGEX.split(words):188 for verse in SLIDE_BREAK_REGEX.split(words):
186 verse = verse.strip()189 verse = verse.strip()
187190
=== modified file 'openlp/plugins/songs/lib/songproimport.py'
--- openlp/plugins/songs/lib/songproimport.py 2012-12-30 19:41:24 +0000
+++ openlp/plugins/songs/lib/songproimport.py 2013-02-03 20:19:19 +0000
@@ -109,7 +109,10 @@
109 self.finish()109 self.finish()
110 return110 return
111 if u'rtf1' in text:111 if u'rtf1' in text:
112 text, self.encoding = strip_rtf(text, self.encoding)112 text = strip_rtf(text, self.encoding)
113 if text is None:
114 return
115 text, self.encoding = text
113 text = text.rstrip()116 text = text.rstrip()
114 if not text:117 if not text:
115 return118 return
116119
=== modified file 'openlp/plugins/songs/lib/sundayplusimport.py'
--- openlp/plugins/songs/lib/sundayplusimport.py 2012-12-30 19:41:24 +0000
+++ openlp/plugins/songs/lib/sundayplusimport.py 2013-02-03 20:19:19 +0000
@@ -150,7 +150,10 @@
150 verse_type = HOTKEY_TO_VERSE_TYPE[value]150 verse_type = HOTKEY_TO_VERSE_TYPE[value]
151 if name == 'rtf':151 if name == 'rtf':
152 value = self.unescape(value)152 value = self.unescape(value)
153 verse, self.encoding = strip_rtf(value, self.encoding)153 verse = strip_rtf(value, self.encoding)
154 if verse is None:
155 return
156 verse, self.encoding = verse
154 lines = verse.strip().split('\n')157 lines = verse.strip().split('\n')
155 # If any line inside any verse contains CCLI or158 # If any line inside any verse contains CCLI or
156 # only Public Domain, we treat this as special data:159 # only Public Domain, we treat this as special data:

Subscribers

People subscribed via source and target branches