Fix #2382: replaygain backend parsing on Python 3

This commit is contained in:
Adrian Sampson 2017-01-10 14:45:57 -05:00
parent 153b01e5a6
commit bc93a11141
2 changed files with 5 additions and 3 deletions

View file

@ -194,8 +194,8 @@ class Bs1770gainBackend(Backend):
"""
# Construct shell command.
cmd = [self.command]
cmd = cmd + [self.method]
cmd = cmd + ['-p']
cmd += [self.method]
cmd += ['-p']
# Workaround for Windows: the underlying tool fails on paths
# with the \\?\ prefix, so we don't use it here. This
@ -227,7 +227,7 @@ class Bs1770gainBackend(Backend):
':|done\\.\\s)', re.DOTALL | re.UNICODE)
results = re.findall(regex, data)
for parts in results[0:num_lines]:
part = parts.split(b'\n')
part = parts.split(u'\n')
if len(part) == 0:
self._log.debug(u'bad tool output: {0!r}', text)
raise ReplayGainError(u'bs1770gain failed')

View file

@ -12,6 +12,8 @@ New features:
Fixes:
* :doc:`/plugins/mpdupdate`: Fix Python 3 compatibility. :bug:`2381`
* :doc:`/plugins/replaygain`: Fix Python 3 compatibility in the ``bs1770gain``
backend. :bug:`2382`
1.4.3 (January 9, 2017)