From c0ee95777b0b54e3536a792131fbd952cc262531 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 6 Feb 2010 03:26:10 +0100 Subject: [PATCH] Fix crash in despotify search --- mopidy/backends/despotify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mopidy/backends/despotify.py b/mopidy/backends/despotify.py index 646228c8..a60e2aac 100644 --- a/mopidy/backends/despotify.py +++ b/mopidy/backends/despotify.py @@ -120,4 +120,5 @@ class DespotifyBackend(BaseBackend): def search(self, type, what): query = u'%s:%s' % (type, what) result = self.spotify.search(query.encode(ENCODING)) - return self._to_mopidy_playlist(result.playlist).mpd_format() + if result is not None: + return self._to_mopidy_playlist(result.playlist).mpd_format()