From 4eb694c84bbab57ecf6148f72a9cf1ac9512b084 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 15 Jan 2011 12:51:20 +0100 Subject: [PATCH] Catch and log pylast.WSError --- mopidy/frontends/lastfm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/frontends/lastfm.py b/mopidy/frontends/lastfm.py index 60c2d708..e2d58b1e 100644 --- a/mopidy/frontends/lastfm.py +++ b/mopidy/frontends/lastfm.py @@ -103,7 +103,7 @@ class LastfmFrontendThread(BaseThread): duration=str(duration), track_number=str(track.track_no), mbid=(track.musicbrainz_id or '')) - except (pylast.ScrobblingError, socket.error) as e: + except (pylast.ScrobblingError, pylast.WSError, socket.error) as e: logger.warning(u'Last.fm now playing error: %s', e) def stopped_playing(self, track, stop_position): @@ -129,5 +129,5 @@ class LastfmFrontendThread(BaseThread): track_number=str(track.track_no), duration=str(duration), mbid=(track.musicbrainz_id or '')) - except (pylast.ScrobblingError, socket.error) as e: + except (pylast.ScrobblingError, pylast.WSError, socket.error) as e: logger.warning(u'Last.fm scrobbling error: %s', e)