Fix a regression in 4d547f40e7

Without the bytearray() c will not be an integer on python2
This commit is contained in:
Kovid Goyal 2019-05-27 11:05:49 +05:30
parent 3cba654949
commit a2c4d44688
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -237,7 +237,7 @@ class APNXBuilder(object):
# not modifying the text. In this case the case # not modifying the text. In this case the case
# doesn't matter just the absolute character and # doesn't matter just the absolute character and
# the position within the stream. # the position within the stream.
data = mr.mobi_html.lower() data = bytearray(as_bytes(mr.mobi_html.lower()))
slash, p, lt, gt = map(ord, '/p<>') slash, p, lt, gt = map(ord, '/p<>')
for c in data: for c in data:
pos += 1 pos += 1