[Erp5-report] r43007 nicolas.dumazet - /erp5/trunk/products/ERP5Type/mixin/temporary.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 4 01:45:41 CET 2011
Author: nicolas.dumazet
Date: Fri Feb 4 01:45:41 2011
New Revision: 43007
URL: http://svn.erp5.org?rev=43007&view=rev
Log:
And explicitely disallow pickling temporary objects to fix TestERP5Type.test_03
Modified:
erp5/trunk/products/ERP5Type/mixin/temporary.py
Modified: erp5/trunk/products/ERP5Type/mixin/temporary.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/mixin/temporary.py?rev=43007&r1=43006&r2=43007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/mixin/temporary.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/mixin/temporary.py [utf8] Fri Feb 4 01:45:41 2011
@@ -26,6 +26,7 @@
#
##############################################################################
+from cPickle import PicklingError
from Acquisition import aq_base
from Products.ERP5Type.Accessor.Constant import PropertyGetter as \
PropertyConstantGetter
@@ -38,6 +39,10 @@ class TemporaryDocumentMixin(object):
isTempDocument = PropertyConstantGetter('isTempDocument', value=True)
__roles__ = None
+ def __getstate__(self):
+ # disallow persistent storage
+ raise PicklingError("Temporary objects can't be pickled")
+
def reindexObject(self, *args, **kw):
pass
More information about the Erp5-report
mailing list