mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3: save server preferences using bytestrings
This commit is contained in:
parent
457eea7407
commit
ba0a4992b6
@ -967,7 +967,7 @@ class CustomList(QWidget): # {{{
|
|||||||
if path:
|
if path:
|
||||||
raw = self.serialize(self.current_template)
|
raw = self.serialize(self.current_template)
|
||||||
with lopen(path, 'wb') as f:
|
with lopen(path, 'wb') as f:
|
||||||
f.write(raw)
|
f.write(raw.encode('utf-8'))
|
||||||
|
|
||||||
def thumbnail_state_changed(self):
|
def thumbnail_state_changed(self):
|
||||||
is_enabled = bool(self.thumbnail.isChecked())
|
is_enabled = bool(self.thumbnail.isChecked())
|
||||||
@ -1020,7 +1020,7 @@ class CustomList(QWidget): # {{{
|
|||||||
else:
|
else:
|
||||||
raw = self.serialize(template)
|
raw = self.serialize(template)
|
||||||
with lopen(custom_list_template.path, 'wb') as f:
|
with lopen(custom_list_template.path, 'wb') as f:
|
||||||
f.write(raw)
|
f.write(raw.encode('utf-8'))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user