[Erp5-report] r39674 jm - in /erp5/trunk/products/ERP5Type/patches: XMLExportImport.py ppml.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 29 12:05:45 CEST 2010


Author: jm
Date: Fri Oct 29 12:05:39 2010
New Revision: 39674

URL: http://svn.erp5.org?rev=39674&view=rev
Log:
exportXML: add comments about random failures when DemoStorage is used

Modified:
    erp5/trunk/products/ERP5Type/patches/XMLExportImport.py
    erp5/trunk/products/ERP5Type/patches/ppml.py

Modified: erp5/trunk/products/ERP5Type/patches/XMLExportImport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/XMLExportImport.py?rev=39674&r1=39673&r2=39674&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/XMLExportImport.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/XMLExportImport.py [utf8] Fri Oct 29 12:05:39 2010
@@ -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')

Modified: erp5/trunk/products/ERP5Type/patches/ppml.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/ppml.py?rev=39674&r1=39673&r2=39674&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/ppml.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/ppml.py [utf8] Fri Oct 29 12:05:39 2010
@@ -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'):




More information about the Erp5-report mailing list