lyrics: Avoid crash when enabling google

If you *both* haven't set an API key *and* BeautifulSoup wasn't
installed, the list.remove() call would crash. (This came up when
running the tests on a fresh machine without many dependencies.)
This commit is contained in:
Adrian Sampson 2016-06-02 11:58:14 -07:00
parent 2228e0e8e1
commit 581fba6288

View file

@ -611,7 +611,7 @@ class LyricsPlugin(plugins.BeetsPlugin):
u'provide an API key in the configuration. '
u'See the documentation for further details.')
sources.remove('google')
if not HAS_BEAUTIFUL_SOUP:
elif not HAS_BEAUTIFUL_SOUP:
self._log.warn(u'To use the google lyrics source, you must '
u'install the beautifulsoup4 module. See the '
u'documentation for further details.')