mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3 compat: fix error when chaning search the net urls for content server
This commit is contained in:
parent
28b551080b
commit
23d626e966
@ -1169,7 +1169,7 @@ class SearchTheInternet(QWidget):
|
|||||||
cu = self.current_urls
|
cu = self.current_urls
|
||||||
if cu:
|
if cu:
|
||||||
with lopen(search_the_net_urls.path, 'wb') as f:
|
with lopen(search_the_net_urls.path, 'wb') as f:
|
||||||
f.write(self.serialized_urls)
|
f.write(self.serialized_urls.encode('utf-8'))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
os.remove(search_the_net_urls.path)
|
os.remove(search_the_net_urls.path)
|
||||||
@ -1184,7 +1184,7 @@ class SearchTheInternet(QWidget):
|
|||||||
filters=[(_('URL files'), ['json'])], initial_filename='search-urls.json')
|
filters=[(_('URL files'), ['json'])], initial_filename='search-urls.json')
|
||||||
if path:
|
if path:
|
||||||
with lopen(path, 'wb') as f:
|
with lopen(path, 'wb') as f:
|
||||||
f.write(self.serialized_urls)
|
f.write(self.serialized_urls.encode('utf-8'))
|
||||||
|
|
||||||
def import_urls(self):
|
def import_urls(self):
|
||||||
paths = choose_files(self, 'search-net-urls', _('Choose URLs file'),
|
paths = choose_files(self, 'search-net-urls', _('Choose URLs file'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user