mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
Possibly fix #1805: bytes headers for requests
This commit is contained in:
parent
231981de0c
commit
8cb545b779
2 changed files with 4 additions and 2 deletions
|
|
@ -72,9 +72,9 @@ def _logged_get(log, *args, **kwargs):
|
|||
else:
|
||||
message = 'getting URL'
|
||||
|
||||
req = requests.Request('GET', *args, **req_kwargs)
|
||||
req = requests.Request(b'GET', *args, **req_kwargs)
|
||||
with requests.Session() as s:
|
||||
s.headers = {'User-Agent': 'beets'}
|
||||
s.headers = {b'User-Agent': b'beets'}
|
||||
prepped = s.prepare_request(req)
|
||||
log.debug('{}: {}', message, prepped.url)
|
||||
return s.send(prepped, **send_kwargs)
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ Fixes:
|
|||
(like the :ref:`modify-cmd` command). :bug:`1804`
|
||||
* The :ref:`stats-cmd` command no longer crashes when files are missing or
|
||||
inaccessible. :bug:`1806`
|
||||
* :doc:`/plugins/fetchart`: Possibly fix a Unicode-related crash when using
|
||||
some versions of pyOpenSSL. :bug:`1805`
|
||||
|
||||
.. _beets.io: http://beets.io/
|
||||
.. _Beetbox: https://github.com/beetbox
|
||||
|
|
|
|||
Loading…
Reference in a new issue