1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-15 14:13:40 +01:00

Removed check for python version

This commit is contained in:
2020-04-21 21:06:48 +02:00
parent 3234e4de27
commit de4f8a444b
21 changed files with 54 additions and 246 deletions

View File

@@ -2,7 +2,6 @@ import codecs, zlib, numbers
from io import BytesIO
from datetime import datetime
from ebook_converter.constants import ispy3
from ebook_converter.utils.logging import default_log
from ebook_converter.polyglot.binary import as_hex_bytes
@@ -65,7 +64,7 @@ def serialize(o, stream):
# Must check bool before int as bools are subclasses of int
stream.write_raw(b'true' if o else b'false')
elif isinstance(o, numbers.Integral):
stream.write_raw(str(o).encode('ascii') if ispy3 else bytes(o))
stream.write_raw(str(o).encode('ascii'))
elif hasattr(o, 'pdf_serialize'):
o.pdf_serialize(stream)
elif o is None: