1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-21 05:31:30 +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
+1 -2
View File
@@ -1,7 +1,6 @@
"""
elements.py -- replacements and helpers for ElementTree
"""
from ebook_converter.polyglot.builtins import string_or_bytes
class ElementWriter(object):
@@ -25,7 +24,7 @@ class ElementWriter(object):
def _writeAttribute(self, f, name, value):
f.write(' %s="' % str(name))
if not isinstance(value, string_or_bytes):
if not isinstance(value, (str, bytes)):
value = str(value)
value = self._encodeCdata(value)
value = value.replace('"', '"')