aboutsummaryrefslogtreecommitdiff
path: root/Lib/fontTools/misc/xmlWriter.py
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-04-03 03:02:26 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-04-03 03:02:26 +0000
commite76853bf40a5da5d1967ae174747408d080c17d6 (patch)
tree8e925d800e27f7a70c2b6a131b14526bc0f095b5 /Lib/fontTools/misc/xmlWriter.py
parent321ed118c46e7067f8b84839ef60df6533788645 (diff)
parentc1d5ba5438b639565b0c35ab2cd58555d0fa7645 (diff)
downloadfonttools-e76853bf40a5da5d1967ae174747408d080c17d6.tar.gz
Change-Id: I2f204f122ad59bca8663ce4c0d538e5f18b59715
Diffstat (limited to 'Lib/fontTools/misc/xmlWriter.py')
-rw-r--r--Lib/fontTools/misc/xmlWriter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/fontTools/misc/xmlWriter.py b/Lib/fontTools/misc/xmlWriter.py
index 6ab8469e..fec127a9 100644
--- a/Lib/fontTools/misc/xmlWriter.py
+++ b/Lib/fontTools/misc/xmlWriter.py
@@ -1,6 +1,6 @@
"""xmlWriter.py -- Simple XML authoring class"""
-from fontTools.misc.py23 import *
+from fontTools.misc.py23 import byteord, strjoin, tobytes, tostr
import sys
import os
import string
@@ -34,8 +34,8 @@ class XMLWriter(object):
self.totype = tobytes
except TypeError:
# This better not fail.
- self.file.write(tounicode(''))
- self.totype = tounicode
+ self.file.write('')
+ self.totype = tostr
self.indentwhite = self.totype(indentwhite)
if newlinestr is None:
self.newlinestr = self.totype(os.linesep)
@@ -156,7 +156,7 @@ class XMLWriter(object):
return ""
data = ""
for attr, value in attributes:
- if not isinstance(value, (bytes, unicode)):
+ if not isinstance(value, (bytes, str)):
value = str(value)
data = data + ' %s="%s"' % (attr, escapeattr(value))
return data