Skip to content

Commit

Permalink
py3: make Check Book work
Browse files Browse the repository at this point in the history
when working with lxml.etree strings, everything is explicitly bytes
  • Loading branch information
eli-schwartz committed Apr 23, 2019
1 parent 2aa2de4 commit abea7a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/calibre/ebooks/oeb/polish/check/opf.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def check_opf(container):
errors.append(IncorrectCover(container.opf_name, cover.sourceline, cover.get('content', '')))
raw = etree.tostring(cover)
try:
n, c = raw.index('name="'), raw.index('content="')
n, c = raw.index(b'name="'), raw.index(b'content="')
except ValueError:
n = c = -1
if n > -1 and c > -1 and n > c:
Expand Down

0 comments on commit abea7a5

Please sign in to comment.