mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-28 22:53:20 +02:00
Fix
This commit is contained in:
parent
b06d484a09
commit
0957cca3b3
2 changed files with 2 additions and 1 deletions
|
|
@ -278,7 +278,7 @@ def get_title_sort(self):
|
|||
|
||||
def get_comments(self):
|
||||
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 None
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ def read_from_opf(self, opfreader):
|
|||
print 'Continuing anyway'
|
||||
else:
|
||||
path = opfreader.manifest.item(toc.lower())
|
||||
path = getattr(path, 'path', path)
|
||||
if path and os.access(path, os.R_OK):
|
||||
self.read_ncx_toc(path)
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue