py3: save server preferences using bytestrings

This commit is contained in:
Eli Schwartz 2019-05-09 11:36:06 -04:00
parent 457eea7407
commit ba0a4992b6
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6

View File

@ -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
# }}} # }}}