Fix haodoo reader to properly pick encoding in python3

It was broken before because the comparison on line 94 would compare header.ident (a unicode string) to BPDB_IDENT (a byte string), which is not comparable in python3.
This commit is contained in:
Justin Uang 2021-06-14 21:21:33 -04:00 committed by GitHub
parent 0bf9cb12fe
commit 5c5ac6e2a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,8 +19,8 @@ from calibre.ebooks.metadata import MetaInformation
from calibre.ebooks.txt.processor import opf_writer, HTML_TEMPLATE from calibre.ebooks.txt.processor import opf_writer, HTML_TEMPLATE
from polyglot.builtins import range, map from polyglot.builtins import range, map
BPDB_IDENT = b'BOOKMTIT' BPDB_IDENT = 'BOOKMTIT'
UPDB_IDENT = b'BOOKMTIU' UPDB_IDENT = 'BOOKMTIU'
punct_table = { punct_table = {
u"": u"", u"": u"",