mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3: make Check Book work
when working with lxml.etree strings, everything is explicitly bytes
This commit is contained in:
parent
570b02c59b
commit
adbe76079e
@ -370,7 +370,7 @@ def check_opf(container):
|
|||||||
errors.append(IncorrectCover(container.opf_name, cover.sourceline, cover.get('content', '')))
|
errors.append(IncorrectCover(container.opf_name, cover.sourceline, cover.get('content', '')))
|
||||||
raw = etree.tostring(cover)
|
raw = etree.tostring(cover)
|
||||||
try:
|
try:
|
||||||
n, c = raw.index('name="'), raw.index('content="')
|
n, c = raw.index(b'name="'), raw.index(b'content="')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
n = c = -1
|
n = c = -1
|
||||||
if n > -1 and c > -1 and n > c:
|
if n > -1 and c > -1 and n > c:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user