diff --git a/beetsplug/mpdupdate.py b/beetsplug/mpdupdate.py index 1240917bb..a6e14e48e 100644 --- a/beetsplug/mpdupdate.py +++ b/beetsplug/mpdupdate.py @@ -97,7 +97,13 @@ class MPDUpdatePlugin(BeetsPlugin): """ self._log.info('Updating MPD database...') - s = BufferedSocket(host, port) + try: + s = BufferedSocket(host, port) + except socket.error as e: + self._log.warning(u'MPD connection failed: {0}', + unicode(e.strerror)) + return + resp = s.readline() if 'OK MPD' not in resp: self._log.warning(u'MPD connection failed: {0!r}', resp)