mirror of
https://github.com/beetbox/beets.git
synced 2026-11-30 21:51:17 -06:00
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:
+1
-1
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user