1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-31 01:13:32 +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 os
from ebook_converter.customize.conversion import InputFormatPlugin
from ebook_converter.polyglot.builtins import unicode_type
__license__ = 'GPL 3'
@@ -50,7 +49,7 @@ class MOBIInput(InputFormatPlugin):
raw = parse_cache.pop('calibre_raw_mobi_markup', False)
if raw:
if isinstance(raw, unicode_type):
if isinstance(raw, str):
raw = raw.encode('utf-8')
with lopen('debug-raw.html', 'wb') as f:
f.write(raw)