[Zope-Checkins] SVN: Zope/branches/2.11/lib/python/DateTime/DateTime.py Omitted upgrade for state dicts w/o '_micros'.

Tres Seaver tseaver at palladion.com
Wed Mar 4 12:00:39 EST 2009


Log message for revision 97472:
  Omitted upgrade for state dicts w/o '_micros'.

Changed:
  U   Zope/branches/2.11/lib/python/DateTime/DateTime.py

-=-
Modified: Zope/branches/2.11/lib/python/DateTime/DateTime.py
===================================================================
--- Zope/branches/2.11/lib/python/DateTime/DateTime.py	2009-03-04 16:44:48 UTC (rev 97471)
+++ Zope/branches/2.11/lib/python/DateTime/DateTime.py	2009-03-04 17:00:38 UTC (rev 97472)
@@ -356,6 +356,8 @@
     def __setstate__(self, state):
         self.__dict__.clear()  # why doesn't Python's unpickler do this?
         self.__dict__.update(state)
+        if '_micros' not in state:
+            self._micros = self._upgrade_old()
 
     def _parse_args(self, *args, **kw):
         """Return a new date-time object.



More information about the Zope-Checkins mailing list