1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-15 06:03:38 +01: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

@@ -15,7 +15,7 @@ from ebook_converter.ebooks.epub import rules
from ebook_converter.ebooks.oeb.base import (OEB_STYLES, XPNSMAP as NAMESPACES,
rewrite_links, XHTML, urlnormalize)
from ebook_converter.ebooks.oeb.polish.split import do_split
from ebook_converter.polyglot.builtins import iteritems, unicode_type
from ebook_converter.polyglot.builtins import iteritems
from ebook_converter.polyglot.urllib import unquote
from ebook_converter.css_selectors import Select, SelectorError
@@ -122,7 +122,7 @@ class Split(object):
for i, elem in enumerate(item.data.iter('*')):
try:
elem.set('pb_order', unicode_type(i))
elem.set('pb_order', str(i))
except TypeError: # Cant set attributes on comment nodes etc.
continue