mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-05-02 11:50:52 +02:00
Removing couple of "buildins" polyglot types
This commit is contained in:
@@ -4,7 +4,6 @@ Transform OEB content into plain text
|
||||
import re
|
||||
|
||||
from lxml import etree
|
||||
from ebook_converter.polyglot.builtins import string_or_bytes
|
||||
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
@@ -189,10 +188,10 @@ class TXTMLizer(object):
|
||||
'''
|
||||
from ebook_converter.ebooks.oeb.base import XHTML_NS, barename, namespace
|
||||
|
||||
if not isinstance(elem.tag, string_or_bytes) \
|
||||
if not isinstance(elem.tag, (str, bytes)) \
|
||||
or namespace(elem.tag) != XHTML_NS:
|
||||
p = elem.getparent()
|
||||
if p is not None and isinstance(p.tag, string_or_bytes) and namespace(p.tag) == XHTML_NS \
|
||||
if p is not None and isinstance(p.tag, (str, bytes)) and namespace(p.tag) == XHTML_NS \
|
||||
and elem.tail:
|
||||
return [elem.tail]
|
||||
return ['']
|
||||
|
||||
Reference in New Issue
Block a user