replaygain: catch Unicode exc on Windows (GC-499)

This commit is contained in:
Adrian Sampson 2013-01-12 14:38:19 -08:00
parent 2df41be44b
commit 902139eeac
2 changed files with 7 additions and 0 deletions

View file

@ -40,6 +40,11 @@ def call(args):
raise ReplayGainError(
"{0} exited with status {1}".format(args[0], e.returncode)
)
except UnicodeEncodeError:
# Due to a bug in Python 2's subprocess on Windows, Unicode
# filenames can fail to encode on that platform. See:
# http://code.google.com/p/beets/issues/detail?id=499
raise ReplayGainError("argument encoding failed")
def parse_tool_output(text):
"""Given the tab-delimited output from an invocation of mp3gain

View file

@ -7,6 +7,8 @@ Changelog
* :doc:`/plugins/scrub`: Fix an incompatibility with Python 2.6.
* :doc:`/plugins/lyrics`: Fix an issue that failed to find lyrics when metadata
contained "real" apostrophes.
* :doc:`/plugins/replaygain`: On Windows, emit a warning instead of
crashing when analyzing non-ASCII filenames.
1.0rc2 (December 31, 2012)
--------------------------