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:
@@ -25,7 +25,6 @@ from ebook_converter.ebooks.rtf2xml import headings_to_sections, \
|
||||
body_styles, preamble_rest, group_styles, \
|
||||
inline
|
||||
from ebook_converter.ebooks.rtf2xml.old_rtf import OldRtf
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
from . import open_for_read, open_for_write
|
||||
|
||||
@@ -249,7 +248,7 @@ class ParseRtf:
|
||||
enc = encode_obj.get_codepage()
|
||||
# TODO: to check if cp is a good idea or if I should use a dict to convert
|
||||
enc = 'cp' + enc
|
||||
msg = '%s\nException in token processing' % unicode_type(msg)
|
||||
msg = '%s\nException in token processing' % str(msg)
|
||||
if check_encoding_obj.check_encoding(self.__file, enc):
|
||||
file_name = self.__file if isinstance(self.__file, bytes) \
|
||||
else self.__file.encode('utf-8')
|
||||
|
||||
Reference in New Issue
Block a user