diff options
Diffstat (limited to 'Lib/fontTools/misc/etree.py')
-rw-r--r-- | Lib/fontTools/misc/etree.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/fontTools/misc/etree.py b/Lib/fontTools/misc/etree.py index 6e943e4b..cd4df365 100644 --- a/Lib/fontTools/misc/etree.py +++ b/Lib/fontTools/misc/etree.py @@ -11,7 +11,7 @@ or subclasses built-in ElementTree classes to add features that are only availble in lxml, like OrderedDict for attributes, pretty_print and iterwalk. """ -from fontTools.misc.py23 import unicode, tostr +from fontTools.misc.textTools import tostr XML_DECLARATION = """<?xml version='1.0' encoding='%s'?>""" @@ -150,9 +150,7 @@ except ImportError: ) return - if encoding is unicode or ( - encoding is not None and encoding.lower() == "unicode" - ): + if encoding is not None and encoding.lower() == "unicode": if xml_declaration: raise ValueError( "Serialisation to unicode must not request an XML declaration" |