fix when the title/artist information is not available

This commit is contained in:
Romain Bignon 2011-02-28 17:49:02 +01:00
commit 61619a30b5

View file

@ -25,6 +25,6 @@ __all__ = ['PlayerPage']
class PlayerPage(BasePage):
def get_current(self):
title = select(self.document.getroot(), 'span.titre_en_cours', 1).text.strip()
artist = select(self.document.getroot(), 'span.artiste_en_cours', 1).text.strip()
return unicode(artist), unicode(title)
title = select(self.document.getroot(), 'span.titre_en_cours', 1).text
artist = select(self.document.getroot(), 'span.artiste_en_cours', 1).text
return unicode(artist).strip(), unicode(title).strip()