mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 20:13:37 +01:00
remove b' from a few more stdlib calls
This commit is contained in:
parent
330306bbe2
commit
81484529c9
3 changed files with 5 additions and 5 deletions
|
|
@ -185,8 +185,8 @@ class ConvertPlugin(BeetsPlugin):
|
|||
args = shlex.split(command)
|
||||
for i, arg in enumerate(args):
|
||||
args[i] = Template(arg).safe_substitute({
|
||||
b'source': source,
|
||||
b'dest': dest,
|
||||
'source': source,
|
||||
'dest': dest,
|
||||
})
|
||||
|
||||
if pretend:
|
||||
|
|
|
|||
|
|
@ -165,9 +165,9 @@ def _logged_get(log, *args, **kwargs):
|
|||
else:
|
||||
message = 'getting URL'
|
||||
|
||||
req = requests.Request(b'GET', *args, **req_kwargs)
|
||||
req = requests.Request('GET', *args, **req_kwargs)
|
||||
with requests.Session() as s:
|
||||
s.headers = {b'User-Agent': b'beets'}
|
||||
s.headers = {'User-Agent': 'beets'}
|
||||
prepped = s.prepare_request(req)
|
||||
log.debug('{}: {}', message, prepped.url)
|
||||
return s.send(prepped, **send_kwargs)
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
|
|||
wl_filename = WHITELIST
|
||||
if wl_filename:
|
||||
wl_filename = normpath(wl_filename)
|
||||
with open(wl_filename, b'r') as f:
|
||||
with open(wl_filename, 'r') as f:
|
||||
for line in f:
|
||||
line = line.decode('utf8').strip().lower()
|
||||
if line and not line.startswith(u'#'):
|
||||
|
|
|
|||
Loading…
Reference in a new issue