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:
@@ -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('"', '"')
|
||||
|
||||
Reference in New Issue
Block a user