Serialize unicode as string in python2

This commit is contained in:
Don Kuntz 2019-08-14 17:32:59 -05:00
parent 1de63b1691
commit 5f80014332

View File

@ -32,7 +32,7 @@ def xml_serialize(tree, key, value):
else:
node = tree
if isinstance(value, (str, int, float)):
if isinstance(value, (str, int, float, six.text_type)):
node.text = str(value)
elif isinstance(value, bool):
node.text = str(value).lower()