1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-20 05:03:35 +02: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

@@ -15,7 +15,7 @@ from odf.namespaces import TEXTNS as odTEXTNS
from ebook_converter import CurrentDir, walk
from ebook_converter.ebooks.oeb.base import _css_logger
from ebook_converter.utils.xml_parse import safe_xml_fromstring
from ebook_converter.polyglot.builtins import string_or_bytes, getcwd, as_bytes
from ebook_converter.polyglot.builtins import getcwd, as_bytes
__license__ = 'GPL v3'
@@ -250,7 +250,7 @@ class Extract(ODF2XHTML):
# first load the odf structure
self.lines = []
self._wfunc = self._wlines
if isinstance(odffile, string_or_bytes) \
if isinstance(odffile, (str, bytes)) \
or hasattr(odffile, 'read'): # Added by Kovid
self.document = odLoad(odffile)
else: