forked from openlp/openlp
Changed typecast to rather check for buffer.
This commit is contained in:
parent
897f7a7dbb
commit
5581a74034
@ -267,9 +267,11 @@ def clean_song(manager, song):
|
|||||||
``song``
|
``song``
|
||||||
The song object.
|
The song object.
|
||||||
"""
|
"""
|
||||||
if not isinstance(song.title, basestring):
|
if isinstance(song.title, buffer):
|
||||||
song.title = unicode(song.title)
|
song.title = unicode(song.title)
|
||||||
if not isinstance(song.lyrics, basestring):
|
if isinstance(song.alternate_title, buffer):
|
||||||
|
song.alternate_title = unicode(song.alternate_title)
|
||||||
|
if isinstance(song.lyrics, buffer):
|
||||||
song.lyrics = unicode(song.lyrics)
|
song.lyrics = unicode(song.lyrics)
|
||||||
song.title = song.title.rstrip() if song.title else u''
|
song.title = song.title.rstrip() if song.title else u''
|
||||||
if song.alternate_title is None:
|
if song.alternate_title is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user