Only logout if we have a session to log out from

This commit is contained in:
Stein Magnus Jodal 2011-11-01 08:44:57 +01:00
parent a9a7f23921
commit 9ce6a155af

View File

@ -164,4 +164,5 @@ class SpotifySessionManager(BaseThread, PyspotifySessionManager):
def logout(self):
"""Log out from spotify"""
logger.debug(u'Logging out from Spotify')
self.session.logout()
if self.session:
self.session.logout()