From f8a4c661faa0e6b5201a0fd88c74cb7f574f52b2 Mon Sep 17 00:00:00 2001 From: wisp3rwind <17089248+wisp3rwind@users.noreply.github.com> Date: Tue, 15 Jun 2021 10:18:46 +0200 Subject: [PATCH] lyrics: return None explicitly --- beetsplug/lyrics.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 83b43ff22..9607a5cb7 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -257,6 +257,7 @@ class Backend(object): return r.text else: self._log.debug(u'failed to fetch: {0} ({1})', url, r.status_code) + return None def fetch(self, artist, title): raise NotImplementedError() @@ -286,11 +287,11 @@ class MusiXmatch(Backend): html = self.fetch_url(url) if not html: - return + return None if "We detected that your IP is blocked" in html: self._log.warning(u'we are blocked at MusixMatch: url %s failed' % url) - return + return None html_parts = html.split('