[Erp5-report] r43936 vincent - /erp5/trunk/products/ERP5Type/patches/DateTimePatch.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 3 13:49:13 CET 2011


Author: vincent
Date: Thu Mar  3 13:49:13 2011
New Revision: 43936

URL: http://svn.erp5.org?rev=43936&view=rev
Log:
For original representation, use original __setstate__.

Modified:
    erp5/trunk/products/ERP5Type/patches/DateTimePatch.py

Modified: erp5/trunk/products/ERP5Type/patches/DateTimePatch.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/DateTimePatch.py?rev=43936&r1=43935&r2=43936&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/DateTimePatch.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/DateTimePatch.py [utf8] Thu Mar  3 13:49:13 2011
@@ -34,6 +34,8 @@ SyntaxError, DateError, TimeError, local
 
 STATE_KEY = 'str'
 
+original_DateTime__setstate__ = DateTimeKlass.__setstate__
+
 def DateTime__setstate__(self, state):
   self.__dict__.clear()
   if isinstance(state, tuple):
@@ -45,7 +47,7 @@ def DateTime__setstate__(self, state):
     self._parse_args(yr, mo, dy, hr, mn, sc, tz, t, d, s)
   elif len(state) != 1 or STATE_KEY not in state:
     # For original pickle representation
-    self.__dict__.update(state)
+    original_DateTime__setstate__(self, state)
   else:
     # For r15569 implementation
     self._parse_args(state[STATE_KEY])



More information about the Erp5-report mailing list