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.
|
suit your distribution.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "0.3.35"
|
__version__ = "0.3.36"
|
||||||
__docformat__ = "epytext"
|
__docformat__ = "epytext"
|
||||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||||
|
|
||||||
|
@ -450,10 +450,10 @@ class HTMLConverter(object):
|
|||||||
|
|
||||||
if not self.top.parent:
|
if not self.top.parent:
|
||||||
if not previous:
|
if not previous:
|
||||||
try:
|
self.top = get_valid_block(self.current_page)
|
||||||
previous = self.book.pages()[0]
|
if not self.top or not self.top.parent:
|
||||||
except IndexError:
|
|
||||||
raise ConversionError, self.file_name + ' does not seem to have any content'
|
raise ConversionError, self.file_name + ' does not seem to have any content'
|
||||||
|
return
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
for page in self.book.pages():
|
for page in self.book.pages():
|
||||||
@ -465,6 +465,7 @@ class HTMLConverter(object):
|
|||||||
if not self.top:
|
if not self.top:
|
||||||
continue
|
continue
|
||||||
break
|
break
|
||||||
|
|
||||||
if not self.top or not self.top.parent:
|
if not self.top or not self.top.parent:
|
||||||
raise ConversionError, 'Could not parse ' + self.file_name
|
raise ConversionError, 'Could not parse ' + self.file_name
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user