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:
@@ -14,7 +14,6 @@ import sys, os
|
||||
|
||||
from ebook_converter.ebooks.rtf2xml import copy, border_parse
|
||||
from ebook_converter.ptempfile import better_mktemp
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
from . import open_for_read, open_for_write
|
||||
|
||||
@@ -399,13 +398,13 @@ class Table:
|
||||
left_position = float(left_position)
|
||||
width = new_cell_position - self.__last_cell_position - left_position
|
||||
# width = round(width, 2)
|
||||
width = unicode_type('%.2f' % width)
|
||||
width = str('%.2f' % width)
|
||||
self.__last_cell_position = new_cell_position
|
||||
widths_exists = self.__row_dict.get('widths')
|
||||
if widths_exists:
|
||||
self.__row_dict['widths'] += ', %s' % unicode_type(width)
|
||||
self.__row_dict['widths'] += ', %s' % str(width)
|
||||
else:
|
||||
self.__row_dict['widths'] = unicode_type(width)
|
||||
self.__row_dict['widths'] = str(width)
|
||||
self.__cell_list[-1]['width'] = width
|
||||
self.__cell_list.append({})
|
||||
self.__cell_widths.append(width)
|
||||
|
||||
Reference in New Issue
Block a user