1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-10 23:23:34 +02:00

Removed polyglots unicode_type usage

This commit is contained in:
2020-04-20 19:25:28 +02:00
parent ef7e2b10be
commit 128705f258
130 changed files with 657 additions and 716 deletions

View File

@@ -6,7 +6,7 @@ import os
from ebook_converter.utils.speedups import ReadOnlyFileBuffer
from ebook_converter.constants import ispy3
from ebook_converter.polyglot.builtins import string_or_bytes, unicode_type
from ebook_converter.polyglot.builtins import string_or_bytes
HSIZE = 120
@@ -41,7 +41,7 @@ def identify(src):
recognized. '''
width = height = -1
if isinstance(src, unicode_type):
if isinstance(src, str):
stream = lopen(src, 'rb')
elif isinstance(src, bytes):
stream = ReadOnlyFileBuffer(src)