discogs: Catch JSON decode errors

Fix #1305 *again*.
This commit is contained in:
Adrian Sampson 2015-02-03 23:42:47 -08:00
parent cc01d87209
commit 0247785440

View file

@ -41,7 +41,8 @@ urllib3_logger.setLevel(logging.CRITICAL)
USER_AGENT = u'beets/{0} +http://beets.radbox.org/'.format(beets.__version__) USER_AGENT = u'beets/{0} +http://beets.radbox.org/'.format(beets.__version__)
# Exceptions that discogs_client should really handle but does not. # Exceptions that discogs_client should really handle but does not.
CONNECTION_ERRORS = ConnectionError, socket.error, httplib.HTTPException CONNECTION_ERRORS = (ConnectionError, socket.error, httplib.HTTPException,
ValueError) # JSON decoding raises a ValueError.
class DiscogsPlugin(BeetsPlugin): class DiscogsPlugin(BeetsPlugin):