Skip to content

Commit 92fb830

Browse files
authored
Merge pull request beetbox#5212 from wisp3rwind/lyrics-cleanup
lyrics: remove version switch that became obsolete when we dropped Python 3.5
2 parents 7543a35 + a9423b7 commit 92fb830

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

beetsplug/lyrics.py

+1-14
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@
4545
except ImportError:
4646
HAS_LANGDETECT = False
4747

48-
try:
49-
# PY3: HTMLParseError was removed in 3.5 as strict mode
50-
# was deprecated in 3.3.
51-
# https://docs.python.org/3.3/library/html.parser.html
52-
from html.parser import HTMLParseError
53-
except ImportError:
54-
55-
class HTMLParseError(Exception):
56-
pass
57-
5848

5949
import beets
6050
from beets import plugins, ui
@@ -230,10 +220,7 @@ def slug(text):
230220
if HAS_BEAUTIFUL_SOUP:
231221

232222
def try_parse_html(html, **kwargs):
233-
try:
234-
return bs4.BeautifulSoup(html, "html.parser", **kwargs)
235-
except HTMLParseError:
236-
return None
223+
return bs4.BeautifulSoup(html, "html.parser", **kwargs)
237224

238225
else:
239226

0 commit comments

Comments
 (0)