Serialize unicode as string in python2
This commit is contained in:
parent
1de63b1691
commit
5f80014332
@ -32,7 +32,7 @@ def xml_serialize(tree, key, value):
|
|||||||
else:
|
else:
|
||||||
node = tree
|
node = tree
|
||||||
|
|
||||||
if isinstance(value, (str, int, float)):
|
if isinstance(value, (str, int, float, six.text_type)):
|
||||||
node.text = str(value)
|
node.text = str(value)
|
||||||
elif isinstance(value, bool):
|
elif isinstance(value, bool):
|
||||||
node.text = str(value).lower()
|
node.text = str(value).lower()
|
||||||
|
Loading…
Reference in New Issue
Block a user