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:
@@ -14,7 +14,6 @@ import sys, os
|
||||
|
||||
from ebook_converter.ebooks.rtf2xml import copy
|
||||
from ebook_converter.ptempfile import better_mktemp
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
from . import open_for_read, open_for_write
|
||||
|
||||
@@ -275,8 +274,8 @@ class Sections:
|
||||
my_string += 'mi<tg<close_____<section\n'
|
||||
else:
|
||||
self.__found_first_sec = 1
|
||||
my_string += 'mi<tg<open-att__<section<num>%s' % unicode_type(self.__section_num)
|
||||
my_string += '<num-in-level>%s' % unicode_type(self.__section_num)
|
||||
my_string += 'mi<tg<open-att__<section<num>%s' % str(self.__section_num)
|
||||
my_string += '<num-in-level>%s' % str(self.__section_num)
|
||||
my_string += '<type>rtf-native'
|
||||
my_string += '<level>0'
|
||||
keys = self.__section_values.keys()
|
||||
@@ -358,7 +357,7 @@ class Sections:
|
||||
'<num-in-level>%s'
|
||||
'<type>rtf-native'
|
||||
'<level>0\n'
|
||||
% (unicode_type(self.__section_num), unicode_type(self.__section_num))
|
||||
% (str(self.__section_num), str(self.__section_num))
|
||||
)
|
||||
self.__found_first_sec = 1
|
||||
elif self.__token_info == 'tx<nu<__________':
|
||||
@@ -369,7 +368,7 @@ class Sections:
|
||||
'<num-in-level>%s'
|
||||
'<type>rtf-native'
|
||||
'<level>0\n'
|
||||
% (unicode_type(self.__section_num), unicode_type(self.__section_num))
|
||||
% (str(self.__section_num), str(self.__section_num))
|
||||
)
|
||||
self.__write_obj.write(
|
||||
'cw<pf<par-def___<true\n'
|
||||
@@ -462,7 +461,7 @@ class Sections:
|
||||
self.__field_num = self.__field_num[1:]
|
||||
self.__write_obj.write(
|
||||
'mi<tg<close_____<section\n'
|
||||
'mi<tg<open-att__<section<num>%s' % unicode_type(num)
|
||||
'mi<tg<open-att__<section<num>%s' % str(num)
|
||||
)
|
||||
if self.__list_of_sec_values:
|
||||
keys = self.__list_of_sec_values[0].keys()
|
||||
@@ -472,7 +471,7 @@ class Sections:
|
||||
self.__list_of_sec_values = self.__list_of_sec_values[1:]
|
||||
self.__write_obj.write('<level>0')
|
||||
self.__write_obj.write('<type>rtf-native')
|
||||
self.__write_obj.write('<num-in-level>%s' % unicode_type(self.__section_num))
|
||||
self.__write_obj.write('<num-in-level>%s' % str(self.__section_num))
|
||||
self.__write_obj.write('\n')
|
||||
# Look here
|
||||
|
||||
|
||||
Reference in New Issue
Block a user