diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index a87715fe3..bffa8414c 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -23,6 +23,7 @@ import unicodedata import urllib import difflib import itertools +import warnings from HTMLParser import HTMLParseError from beets import logging @@ -61,7 +62,13 @@ def fetch_url(url): is unreachable. """ try: - r = requests.get(url, verify=False) + # Disable the InsecureRequestWarning that comes from using + # `verify=false`. + # https://github.com/kennethreitz/requests/issues/2214 + # We're not overly worried about the NSA MITMing our lyrics scraper. + with warnings.catch_warnings(): + warnings.simplefilter('ignore') + r = requests.get(url, verify=False) except requests.RequestException as exc: log.debug(u'lyrics request failed: {0}', exc) return diff --git a/docs/changelog.rst b/docs/changelog.rst index 5936d1237..e77bf480f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,7 +4,10 @@ Changelog 1.3.11 (in development) ----------------------- -Changelog goes here! +Fixes: + +* :doc:`/plugins/lyrics`: Silence a warning about insecure requests in the new + MusixMatch backend. :bug:`1204` 1.3.10 (January 5, 2015)