mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
decode yaml dumped data as utf-8 in edit plugin for PY2
Yaml doesn't return a true unicode string even with `allow_unicode` passed to `safe_dump_all`.
This commit is contained in:
parent
19240f3ba8
commit
47bddb394c
1 changed files with 2 additions and 0 deletions
|
|
@ -252,6 +252,8 @@ class EditPlugin(plugins.BeetsPlugin):
|
|||
encoding='utf-8')
|
||||
old_str = dump(old_data)
|
||||
new.write(old_str)
|
||||
if six.PY2:
|
||||
old_str = old_str.decode('utf-8')
|
||||
new.close()
|
||||
|
||||
# Loop until we have parseable data and the user confirms.
|
||||
|
|
|
|||
Loading…
Reference in a new issue