mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3: make Polish Book work
str() template cannot be formatted with an encoded bytestring because b''.__str__() is unuseful. So just defer encoding to right before writing.
This commit is contained in:
parent
adbe76079e
commit
bca47af433
@ -393,7 +393,7 @@ def create_epub_cover(container, cover_path, existing_image, options=None):
|
||||
titlepage_item = container.generate_item(tname, id_prefix='titlepage')
|
||||
titlepage = container.href_to_name(titlepage_item.get('href'),
|
||||
container.opf_name)
|
||||
raw = templ%container.name_to_href(raster_cover, titlepage).encode('utf-8')
|
||||
raw = (templ%container.name_to_href(raster_cover, titlepage)).encode('utf-8')
|
||||
with container.open(titlepage, 'wb') as f:
|
||||
f.write(raw)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user