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

Proposed by Phill
Status: Merged
Approved by: Tim Bentley
Approved revision: 2134
Merged at revision: 2131
Proposed branch: lp:~phill-ridout/openlp/bug1098075_2.0
Merge into: lp:openlp/2.0
Diff against target: 60 lines (+14/-3)
4 files modified
openlp/plugins/songs/lib/__init__.py (+2/-0)
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
Tim Bentley Approve
Raoul Snyman Approve
Review via email: mp+146488@code.launchpad.net

This proposal supersedes a proposal from 2013-02-04.

Description of the change

Fixes bug 1098075 by returning None as requested by Raoul. Now for the correct target branch.
Changed the return var to result
A little tweak to reduce code

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

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

review: Approve
Revision history for this message
Phill (phill-ridout) wrote :

I'm done resubmitting. Promise. Sorry

Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve
Revision history for this message
Tim Bentley (trb143) :
review: Approve

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-04 18:34:22 +0000
@@ -581,6 +581,8 @@
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 if not encoding:
585 return None
584 out.append(chr(charcode).decode(encoding))586 out.append(chr(charcode).decode(encoding))
585 except UnicodeDecodeError:587 except UnicodeDecodeError:
586 failed = True588 failed = True
587589
=== 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-04 18:34:22 +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 result = strip_rtf(words, self.encoding)
184 if result is None:
185 return
186 words, self.encoding = result
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-04 18:34:22 +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 result = strip_rtf(text, self.encoding)
113 if result is None:
114 return
115 text, self.encoding = result
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-04 18:34:22 +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 result = strip_rtf(value, self.encoding)
154 if result is None:
155 return
156 verse, self.encoding = result
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