mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #587
This commit is contained in:
parent
34ddfb4135
commit
3ae6a3fb0c
@ -79,7 +79,7 @@ class TOC(list):
|
|||||||
if 'toc' in item.href.lower():
|
if 'toc' in item.href.lower():
|
||||||
toc = item.href
|
toc = item.href
|
||||||
break
|
break
|
||||||
|
|
||||||
if toc is not None:
|
if toc is not None:
|
||||||
if toc.lower() != 'ncx':
|
if toc.lower() != 'ncx':
|
||||||
toc = urlparse(unquote(toc))[2]
|
toc = urlparse(unquote(toc))[2]
|
||||||
@ -92,9 +92,12 @@ class TOC(list):
|
|||||||
bn = bn.replace('_top.htm', '_toc.htm') # Bug in BAEN OPF files
|
bn = bn.replace('_top.htm', '_toc.htm') # Bug in BAEN OPF files
|
||||||
toc = os.path.join(os.path.dirname(toc), bn)
|
toc = os.path.join(os.path.dirname(toc), bn)
|
||||||
|
|
||||||
self.read_html_toc(toc, self.base_path)
|
self.read_html_toc(toc)
|
||||||
except:
|
except:
|
||||||
pass
|
print 'WARNING: Could not read Table of Contents:'
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
print 'Continuing anyway'
|
||||||
else:
|
else:
|
||||||
cwd = os.path.abspath(self.base_path)
|
cwd = os.path.abspath(self.base_path)
|
||||||
m = glob.glob(os.path.join(cwd, '*.ncx'))
|
m = glob.glob(os.path.join(cwd, '*.ncx'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user