1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-27 04:53:31 +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

@@ -13,7 +13,7 @@ from ebook_converter.ebooks.oeb.base import (
XHTML, XHTML_NS, SVG_NS, barename, namespace, OEB_IMAGES, XLINK, rewrite_links, urlnormalize)
from ebook_converter.ebooks.oeb.stylizer import Stylizer
from ebook_converter.utils.logging import default_log
from ebook_converter.polyglot.builtins import unicode_type, string_or_bytes, as_bytes
from ebook_converter.polyglot.builtins import string_or_bytes, as_bytes
__license__ = 'GPL 3'
@@ -43,7 +43,7 @@ class OEB2HTML(object):
self.log.info('Converting OEB book to HTML...')
self.opts = opts
try:
self.book_title = unicode_type(oeb_book.metadata.title[0])
self.book_title = str(oeb_book.metadata.title[0])
except Exception:
self.book_title = _('Unknown')
self.links = {}