mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-03 11:03:32 +02:00
Removed polyglots unicode_type usage
This commit is contained in:
@@ -8,7 +8,6 @@ from ebook_converter.ebooks.mobi.langcodes import main_language, sub_language, m
|
||||
from ebook_converter.utils.cleantext import clean_ascii_chars, clean_xml_chars
|
||||
from ebook_converter.utils.localization import canonicalize_lang
|
||||
from ebook_converter.utils.config_base import tweaks
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
@@ -245,7 +244,7 @@ class BookHeader(object):
|
||||
|
||||
self.exth_flag, = struct.unpack('>L', raw[0x80:0x84])
|
||||
self.exth = None
|
||||
if not isinstance(self.title, unicode_type):
|
||||
if not isinstance(self.title, str):
|
||||
self.title = self.title.decode(self.codec, 'replace')
|
||||
if self.exth_flag & 0x40:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user