mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-18 12:03:33 +02:00
Removed polyglots unicode_type usage
This commit is contained in:
@@ -4,7 +4,6 @@ HTML-TOC-adding transform.
|
||||
from ebook_converter.ebooks.oeb.base import XML, XHTML, XHTML_NS
|
||||
from ebook_converter.ebooks.oeb.base import XHTML_MIME, CSS_MIME
|
||||
from ebook_converter.ebooks.oeb.base import element, XPath
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
|
||||
__all__ = ['HTMLTOCAdder']
|
||||
@@ -93,7 +92,7 @@ class HTMLTOCAdder(object):
|
||||
style = 'nested'
|
||||
id, css_href = oeb.manifest.generate('tocstyle', 'tocstyle.css')
|
||||
oeb.manifest.add(id, css_href, CSS_MIME, data=STYLE_CSS[style])
|
||||
language = unicode_type(oeb.metadata.language[0])
|
||||
language = str(oeb.metadata.language[0])
|
||||
contents = element(None, XHTML('html'), nsmap={None: XHTML_NS},
|
||||
attrib={XML('lang'): language})
|
||||
head = element(contents, XHTML('head'))
|
||||
|
||||
Reference in New Issue
Block a user