mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 18:43:39 +02:00
py3 compat
This commit is contained in:
parent
3946727192
commit
66b10927fb
1 changed files with 2 additions and 0 deletions
|
|
@ -30,6 +30,8 @@ def set_data(name, val):
|
|||
editors[name].replace_data(val, only_if_different=False)
|
||||
else:
|
||||
with current_container().open(name, 'wb') as f:
|
||||
if isinstance(val, str):
|
||||
val = val.encode('utf-8')
|
||||
f.write(val)
|
||||
get_boss().set_modified()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue