Commit e04ae650 authored by Julien Muchembled's avatar Julien Muchembled

exportXML: add comments about random failures when DemoStorage is used

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39674 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 05c1f7fb
......@@ -177,6 +177,13 @@ def XMLrecord(oid, plen, p, id_mapping):
XMLExportImport.XMLrecord = XMLrecord
def exportXML(jar, oid, file=None):
# XXX: For performance reasons, we should change XMLExportImport/ppml code
# so that we can call reorderPickle and XMLrecord only once.
# This means we should be able to do a real export immediately.
# This would also fix random failures when DemoStorage is used,
# because oids can have values that have a shorter representation
# in 'repr' instead of 'base64' (see ppml.convert) and ppml.String
# does not support this.
if file is None: file=TemporaryFile()
elif type(file) is StringType: file=open(file,'w+b')
......
......@@ -140,7 +140,9 @@ class String(Scalar):
v = self.mapping.convertBase64(v)
else:
# Make sure we never produce this kind of xml output
raise
# XXX: In fact, this can happen when DemoStorage is used
# See notes in XMLExportImport.exportXML
raise NotImplementedError
id = ''
encoding=''
if hasattr(self, 'encoding'):
......
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