remove b' from a few more stdlib calls

This commit is contained in:
Johnny Robeson 2016-05-31 00:12:26 -04:00
parent 330306bbe2
commit 81484529c9
3 changed files with 5 additions and 5 deletions

View file

@ -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:

View file

@ -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)

View file

@ -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'#'):