From 72db4af7f8b9a35e6324c8e0f71d97ec0645506c Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Mon, 27 Oct 2014 09:24:59 -0700 Subject: [PATCH] Fix #1041: play unicode logging crash --- beetsplug/play.py | 5 ++++- docs/changelog.rst | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/beetsplug/play.py b/beetsplug/play.py index 38ef379dd..c98be40a0 100644 --- a/beetsplug/play.py +++ b/beetsplug/play.py @@ -101,7 +101,10 @@ def play_music(lib, opts, args): # Invoke the command and log the output. output = util.command_output(command) if output: - log.debug(u'Output of {0}: {1}'.format(command[0], output)) + log.debug(u'Output of {0}: {1}'.format( + util.displayable_path(command[0]), + output.decode('utf8', 'ignore'), + )) ui.print_(u'Playing {0} {1}.'.format(len(selection), item_type)) diff --git a/docs/changelog.rst b/docs/changelog.rst index 26a8e5b3e..71bd27bab 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -53,6 +53,8 @@ Fixes: * :doc:`/plugins/discogs`: Authenticate with the Discogs server. The plugin now requires a Discogs account due to new API restrictions. Thanks to :user:`multikatt`. :bug:`1027`, :bug:`1040` +* :doc:`/plugins/play`: Fix a potential crash when the command outputs special + characters. :bug:`1041` 1.3.8 (September 17, 2014)