Changed typecast to rather check for buffer.

This commit is contained in:
Raoul Snyman 2011-07-08 08:40:50 +02:00
parent 897f7a7dbb
commit 5581a74034

View File

@ -267,9 +267,11 @@ def clean_song(manager, song):
``song``
The song object.
"""
if not isinstance(song.title, basestring):
if isinstance(song.title, buffer):
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.title = song.title.rstrip() if song.title else u''
if song.alternate_title is None: