Skip to content

Instantly share code, notes, and snippets.

@chihchun
Last active January 23, 2017 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chihchun/eee7413f1024cc63829c1f62e8a84f39 to your computer and use it in GitHub Desktop.
Save chihchun/eee7413f1024cc63829c1f62e8a84f39 to your computer and use it in GitHub Desktop.
diff --git a/main.py b/main.py
index 26a0e10..eb125c3 100644
--- a/main.py
+++ b/main.py
@@ -16,7 +16,10 @@ from calibre.gui2.tweak_book.plugin import Tool
from calibre.gui2.tweak_book import editor_name
from calibre.gui2 import error_dialog, info_dialog
from calibre.ebooks.oeb.polish.container import OEB_DOCS, OEB_STYLES, get_container
-from calibre.ebooks.oeb.polish.toc import get_toc, find_existing_ncx_toc, commit_toc
+try:
+ from calibre.ebooks.oeb.polish.toc import get_toc, find_existing_ncx_toc, commit_toc
+except:
+ from calibre.ebooks.oeb.polish.toc import get_toc, find_existing_toc, commit_toc
'''
TradSimpChinese
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment