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

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Aug 11 15:45:49 CEST 2007


Author: yo
Date: Sat Aug 11 15:45:49 2007
New Revision: 15614

URL: http://svn.erp5.org?rev=15614&view=rev
Log:
Disable the hack by vincent, because I now understand the consequence that it breaks the simulation due to divergency.

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=15614&r1=15613&r2=15614&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/DateTimePatch.py (original)
+++ erp5/trunk/products/ERP5Type/patches/DateTimePatch.py Sat Aug 11 15:45:49 2007
@@ -32,14 +32,19 @@
 
 def DateTime__setstate__(self, state):
   if len(state) != 1 or STATE_KEY not in state:
-    # For backward compatibility
     self.__dict__.update(state)
   else:
+    # For backward compatibility
     self._parse_args(state[STATE_KEY])
 
 DateTimeKlass.__setstate__ = DateTime__setstate__
   
-def DateTime__getstate__(self):
-  return {STATE_KEY: str(self)}
-
-DateTimeKlass.__getstate__ = DateTime__getstate__
+# This below is disabled, because this loses information at
+# millisecond level, and it breaks the simulation due to
+# divergency tests. I will not disable the above for backward
+# compatibility. -yo
+# 
+# def DateTime__getstate__(self):
+#   return {STATE_KEY: str(self)}
+# 
+# DateTimeKlass.__getstate__ = DateTime__getstate__




More information about the Erp5-report mailing list