Merge lp:~raoul-snyman/openlp/bug-794971 into lp:openlp

Proposed by Raoul Snyman
Status: Merged
Approved by: Andreas Preikschat
Approved revision: 1677
Merged at revision: 1679
Proposed branch: lp:~raoul-snyman/openlp/bug-794971
Merge into: lp:openlp
Diff against target: 16 lines (+6/-0)
1 file modified
openlp/plugins/songs/lib/__init__.py (+6/-0)
To merge this branch: bzr merge lp:~raoul-snyman/openlp/bug-794971
Reviewer Review Type Date Requested Status
Andreas Preikschat (community) Approve
Tim Bentley Approve
Review via email: mp+67283@code.launchpad.net

This proposal supersedes a proposal from 2011-07-08.

Description of the change

Fixed bug #794971 by typecasting the title and lyrics fields to unicode objects if they are buffer objects.

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) :
review: Approve
Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/plugins/songs/lib/__init__.py'
2--- openlp/plugins/songs/lib/__init__.py 2011-06-12 16:02:52 +0000
3+++ openlp/plugins/songs/lib/__init__.py 2011-07-08 06:42:56 +0000
4@@ -267,6 +267,12 @@
5 ``song``
6 The song object.
7 """
8+ if isinstance(song.title, buffer):
9+ song.title = unicode(song.title)
10+ if isinstance(song.alternate_title, buffer):
11+ song.alternate_title = unicode(song.alternate_title)
12+ if isinstance(song.lyrics, buffer):
13+ song.lyrics = unicode(song.lyrics)
14 song.title = song.title.rstrip() if song.title else u''
15 if song.alternate_title is None:
16 song.alternate_title = u''