From 81484529c97f77e2bdded31e8d80274719629f03 Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Tue, 31 May 2016 00:12:26 -0400 Subject: [PATCH] remove b' from a few more stdlib calls --- beetsplug/convert.py | 4 ++-- beetsplug/fetchart.py | 4 ++-- beetsplug/lastgenre/__init__.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/beetsplug/convert.py b/beetsplug/convert.py index 6463d2a1f..de91604f5 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -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: diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index a18e362e5..2cc362e4a 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -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) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index ad051c45c..a4b8f062b 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -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'#'):