1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-17 19:43: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

@@ -1,7 +1,6 @@
import re, os
from ebook_converter.ebooks.chardet import strip_encoding_declarations
from ebook_converter.polyglot.builtins import unicode_type
__license__ = 'GPL v3'
@@ -127,7 +126,7 @@ def update_flow_links(mobi8_reader, resource_map, log):
flows.append(flow)
continue
if not isinstance(flow, unicode_type):
if not isinstance(flow, str):
try:
flow = flow.decode(mr.header.codec)
except UnicodeDecodeError: