diff options
author | Elliott Hughes <enh@google.com> | 2021-04-01 15:12:06 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2021-04-01 15:12:06 -0700 |
commit | 6cf80b8fa7eece3694d7375ff5de9a7f2cd19f7e (patch) | |
tree | 8e925d800e27f7a70c2b6a131b14526bc0f095b5 /Lib/fontTools/misc/xmlWriter.py | |
parent | 0e9d14bbfdfd2a1bf74c38eed07dc9b0ddf0162f (diff) | |
download | fonttools-6cf80b8fa7eece3694d7375ff5de9a7f2cd19f7e.tar.gz |
Upgrade fonttools to 4.22.0android-s-beta-2android-s-beta-1
Test: make
Change-Id: I69cdb494f27868e707969c325386f039e5ea0e45
Diffstat (limited to 'Lib/fontTools/misc/xmlWriter.py')
-rw-r--r-- | Lib/fontTools/misc/xmlWriter.py | 8 |
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 |