summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwisp3rwind <17089248+wisp3rwind@users.noreply.github.com>2023-11-11 16:42:23 +0100
committerwisp3rwind <17089248+wisp3rwind@users.noreply.github.com>2024-04-27 16:02:26 +0200
commita9423b7b2d58ffbefb8a0afb22dcb74b29654872 (patch)
tree22142c9335973cfd954c01cf6b1258fb5502976d
parent7543a351ed9938a17dd855213d0264b42f482c4b (diff)
lyrics: remove version switch that became obsolete when we dropped Python 3.5
-rw-r--r--beetsplug/lyrics.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py
index a88a55791..b067a264b 100644
--- a/beetsplug/lyrics.py
+++ b/beetsplug/lyrics.py
@@ -45,16 +45,6 @@ try:
except ImportError:
HAS_LANGDETECT = False
-try:
- # PY3: HTMLParseError was removed in 3.5 as strict mode
- # was deprecated in 3.3.
- # https://docs.python.org/3.3/library/html.parser.html
- from html.parser import HTMLParseError
-except ImportError:
-
- class HTMLParseError(Exception):
- pass
-
import beets
from beets import plugins, ui
@@ -230,10 +220,7 @@ def slug(text):
if HAS_BEAUTIFUL_SOUP:
def try_parse_html(html, **kwargs):
- try:
- return bs4.BeautifulSoup(html, "html.parser", **kwargs)
- except HTMLParseError:
- return None
+ return bs4.BeautifulSoup(html, "html.parser", **kwargs)
else: