mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix
This commit is contained in:
parent
b06d484a09
commit
0957cca3b3
@ -278,7 +278,7 @@ class OPF(MetaInformation):
|
|||||||
|
|
||||||
def get_comments(self):
|
def get_comments(self):
|
||||||
comments = self.soup.find('dc:description')
|
comments = self.soup.find('dc:description')
|
||||||
if comments:
|
if comments and comments.string:
|
||||||
return self.ENTITY_PATTERN.sub(entity_to_unicode, comments.string).strip()
|
return self.ENTITY_PATTERN.sub(entity_to_unicode, comments.string).strip()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@ class TOC(list):
|
|||||||
print 'Continuing anyway'
|
print 'Continuing anyway'
|
||||||
else:
|
else:
|
||||||
path = opfreader.manifest.item(toc.lower())
|
path = opfreader.manifest.item(toc.lower())
|
||||||
|
path = getattr(path, 'path', path)
|
||||||
if path and os.access(path, os.R_OK):
|
if path and os.access(path, os.R_OK):
|
||||||
self.read_ncx_toc(path)
|
self.read_ncx_toc(path)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user