mirror of
https://github.com/beetbox/beets.git
synced 2026-02-10 01:13:02 +01:00
metasync: More precise exception catching (#1700)
This commit is contained in:
parent
a7952b1b1d
commit
be49955884
1 changed files with 4 additions and 2 deletions
|
|
@ -111,11 +111,13 @@ class MetaSyncPlugin(BeetsPlugin):
|
|||
# Instantiate the meta sources
|
||||
for player in sources:
|
||||
try:
|
||||
meta_source_instances[player] = \
|
||||
META_SOURCES[player](self.config, self._log)
|
||||
cls = META_SOURCES[player]
|
||||
except KeyError:
|
||||
self._log.error(u'Unknown metadata source \'{0}\''.format(
|
||||
player))
|
||||
|
||||
try:
|
||||
meta_source_instances[player] = cls(self.config, self._log)
|
||||
except (ImportError, ConfigValueError) as e:
|
||||
self._log.error(u'Failed to instantiate metadata source '
|
||||
u'\'{0}\': {1}'.format(player, e))
|
||||
|
|
|
|||
Loading…
Reference in a new issue