mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix another bug in top detection. Hopefully that's the last.
This commit is contained in:
parent
7a21b56f22
commit
84e6a65425
@ -33,7 +33,7 @@ You may have to adjust the GROUP and the location of the rules file to
|
||||
suit your distribution.
|
||||
"""
|
||||
|
||||
__version__ = "0.3.35"
|
||||
__version__ = "0.3.36"
|
||||
__docformat__ = "epytext"
|
||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||
|
||||
|
@ -450,11 +450,11 @@ class HTMLConverter(object):
|
||||
|
||||
if not self.top.parent:
|
||||
if not previous:
|
||||
try:
|
||||
previous = self.book.pages()[0]
|
||||
except IndexError:
|
||||
self.top = get_valid_block(self.current_page)
|
||||
if not self.top or not self.top.parent:
|
||||
raise ConversionError, self.file_name + ' does not seem to have any content'
|
||||
|
||||
return
|
||||
|
||||
found = False
|
||||
for page in self.book.pages():
|
||||
if page == previous:
|
||||
@ -465,6 +465,7 @@ class HTMLConverter(object):
|
||||
if not self.top:
|
||||
continue
|
||||
break
|
||||
|
||||
if not self.top or not self.top.parent:
|
||||
raise ConversionError, 'Could not parse ' + self.file_name
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user