mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
EPUB Output: Fix an error causing conversion to fail when outputting to EPUB 3 and the input document has no preexisting nav. Fixes #1773533 [epub to epub conversion failed due to Python problem](https://bugs.launchpad.net/calibre/+bug/1773533)
This commit is contained in:
parent
b3fc627990
commit
6af9997c7c
@ -298,7 +298,8 @@ class EPUBOutput(OutputFormatPlugin):
|
|||||||
from calibre.ebooks.oeb.polish.upgrade import epub_2_to_3
|
from calibre.ebooks.oeb.polish.upgrade import epub_2_to_3
|
||||||
existing_nav = getattr(self.opts, 'epub3_nav_parsed', None)
|
existing_nav = getattr(self.opts, 'epub3_nav_parsed', None)
|
||||||
nav_href = getattr(self.opts, 'epub3_nav_href', None)
|
nav_href = getattr(self.opts, 'epub3_nav_href', None)
|
||||||
epub_2_to_3(container, self.log.info, previous_nav=(nav_href, existing_nav))
|
previous_nav = (existing_nav, nav_href) if existing_nav and nav_href else None
|
||||||
|
epub_2_to_3(container, self.log.info, previous_nav=previous_nav)
|
||||||
fix_conversion_titlepage_links_in_nav(container)
|
fix_conversion_titlepage_links_in_nav(container)
|
||||||
container.commit()
|
container.commit()
|
||||||
os.remove(f.name)
|
os.remove(f.name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user