mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 00:53:08 +01:00
discogs: Better exception logging
Might have helped diagnose #1669 more easily.
This commit is contained in:
parent
023a33ca31
commit
a735a6b4a2
1 changed files with 7 additions and 7 deletions
|
|
@ -150,8 +150,8 @@ class DiscogsPlugin(BeetsPlugin):
|
||||||
return self.candidates(items, artist, album, va_likely)
|
return self.candidates(items, artist, album, va_likely)
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
except CONNECTION_ERRORS as e:
|
except CONNECTION_ERRORS:
|
||||||
self._log.debug(u'HTTP Connection Error: {0}', e)
|
self._log.debug('Connection error in album search', exc_info=True)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def album_for_id(self, album_id):
|
def album_for_id(self, album_id):
|
||||||
|
|
@ -181,8 +181,8 @@ class DiscogsPlugin(BeetsPlugin):
|
||||||
self.reset_auth()
|
self.reset_auth()
|
||||||
return self.album_for_id(album_id)
|
return self.album_for_id(album_id)
|
||||||
return None
|
return None
|
||||||
except CONNECTION_ERRORS as e:
|
except CONNECTION_ERRORS:
|
||||||
self._log.debug(u'HTTP Connection Error: {0}', e)
|
self._log.debug('Connection error in album lookup', exc_info=True)
|
||||||
return None
|
return None
|
||||||
return self.get_album_info(result)
|
return self.get_album_info(result)
|
||||||
|
|
||||||
|
|
@ -203,9 +203,9 @@ class DiscogsPlugin(BeetsPlugin):
|
||||||
try:
|
try:
|
||||||
releases = self.discogs_client.search(query,
|
releases = self.discogs_client.search(query,
|
||||||
type='release').page(1)
|
type='release').page(1)
|
||||||
except CONNECTION_ERRORS as exc:
|
except CONNECTION_ERRORS:
|
||||||
self._log.debug("Communication error while searching for {0!r}: "
|
self._log.debug("Communication error while searching for {0!r}",
|
||||||
"{1}".format(query, exc))
|
query, exc_info=True)
|
||||||
return []
|
return []
|
||||||
return [self.get_album_info(release) for release in releases[:5]]
|
return [self.get_album_info(release) for release in releases[:5]]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue