1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-28 14:33:31 +01:00

Removing couple of "buildins" polyglot types

This commit is contained in:
2020-04-20 20:22:50 +02:00
parent eac0b98d6f
commit c867f0321b
36 changed files with 85 additions and 109 deletions

View File

@@ -16,7 +16,7 @@ from ebook_converter.ebooks.oeb.base import (XHTML, XHTML_NS, CSS_MIME, OEB_STYL
from ebook_converter.ebooks.oeb.stylizer import Stylizer
from ebook_converter.utils.filenames import ascii_filename, ascii_text
from ebook_converter.utils.icu import numeric_sort_key
from ebook_converter.polyglot.builtins import iteritems, string_or_bytes
from ebook_converter.polyglot.builtins import iteritems
__license__ = 'GPL v3'
@@ -351,7 +351,7 @@ class CSSFlattener(object):
cssdict[property] = "%0.5fem" % (value / fsize)
def flatten_node(self, node, stylizer, names, styles, pseudo_styles, psize, item_id, recurse=True):
if not isinstance(node.tag, string_or_bytes) \
if not isinstance(node.tag, (str, bytes)) \
or namespace(node.tag) != XHTML_NS:
return
tag = barename(node.tag)