Fix #1735: convert --pretend encoding error

This commit is contained in:
Adrian Sampson 2015-11-21 12:40:45 -08:00
parent 9702011884
commit eb68177fee
3 changed files with 8 additions and 1 deletions

View file

@ -189,7 +189,7 @@ class ConvertPlugin(BeetsPlugin):
})
if pretend:
self._log.info(' '.join(args))
self._log.info(' '.join(ui.decargs(args)))
return
try:

View file

@ -64,6 +64,8 @@ Fixes:
:bug:`1666`
* :doc:`/plugins/thumbnails`: Fix a nasty segmentation fault crash that arose
with some library versions. :bug:`1433`
* :doc:`/plugins/convert`: Fix a crash with Unicode paths in ``--pretend``
mode. :bug:`1735`
.. _Emby Server: http://emby.media

View file

@ -180,6 +180,11 @@ class ConvertCliTest(unittest.TestCase, TestHelper):
with open(converted, 'r') as f:
self.assertEqual(f.read(), 'XXX')
def test_pretend(self):
self.run_command('convert', '--pretend', self.item.path)
converted = os.path.join(self.convert_dest, 'converted.mp3')
self.assertFalse(os.path.exists(converted))
class NeverConvertLossyFilesTest(unittest.TestCase, TestHelper):
"""Test the effect of the `never_convert_lossy_files` option.