Commit 1b4b0cf8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

XMLExportImport: Base_asXML and Folder_asXML return str, not bytes.

parent f0db2e99
......@@ -210,7 +210,7 @@ def Base_asXML(object, root=None):
if return_as_object:
return root
return etree.tostring(root, encoding='utf-8',
xml_declaration=True, pretty_print=True)
xml_declaration=True, pretty_print=True).decode('utf-8')
def Folder_asXML(object, omit_xml_declaration=True, root=None):
"""
......@@ -232,7 +232,7 @@ def Folder_asXML(object, omit_xml_declaration=True, root=None):
o.asXML(root=root_node)
return etree.tostring(root, encoding='utf-8',
xml_declaration=xml_declaration, pretty_print=True)
xml_declaration=xml_declaration, pretty_print=True).decode('utf-8')
## The code below was initially from OFS.XMLExportImport
from six import string_types as basestring
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment