From b25b4db9e1c4f72ec9fd23b6c946ce098371edea Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 26 Dec 2015 22:40:13 -0800 Subject: [PATCH] replaygain: Dodge possible encoding issues In error reporting. May avoid the error in #1774, but it's hard to find out exactly what the Python types of these arguments are from the GStreamer documentation. --- beetsplug/replaygain.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index 422c345d8..bb715f292 100644 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -522,10 +522,9 @@ class GStreamerBackend(Backend): err, debug = message.parse_error() f = self._src.get_property("location") # A GStreamer error, either an unsupported format or a bug. - self._error = \ - ReplayGainError(u"Error {0} - {1} on file {2}".format(err, - debug, - f)) + self._error = ReplayGainError( + "Error {0!r} - {1!r} on file {2!r}".format(err, debug, f) + ) def _on_tag(self, bus, message): tags = message.parse_tag()