Use unicode for command formatting

This commit is contained in:
Jack Wilsdon 2016-05-01 18:26:06 +01:00
parent 2c071e2ff5
commit b9464d1ea4

View file

@ -47,7 +47,9 @@ class HookPlugin(BeetsPlugin):
self._log.error('invalid command "{0}"', command)
return
formatted_command = command.format(event=event, **kwargs)
unicode_command = command.decode('utf-8')
formatted_command = unicode_command.format(event=event,
**kwargs)
encoded_command = formatted_command.decode(_arg_encoding())
command_pieces = shlex.split(encoded_command)