* morituri/common/common.py:
Since the version was inherited from the current code in unpickled objects, separate into classVersion and an instanceVersion set from __init__.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-05-25 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/common/common.py:
|
||||
Since the version was inherited from the current code
|
||||
in unpickled objects, separate into classVersion and
|
||||
an instanceVersion set from __init__.
|
||||
|
||||
2009-05-25 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/image/toc.py:
|
||||
|
||||
@@ -167,10 +167,9 @@ class PersistedCache(object):
|
||||
"""
|
||||
persister = Persister(self._getPath(key))
|
||||
if persister.object:
|
||||
if hasattr(persister.object, 'version'):
|
||||
if hasattr(persister.object, 'instanceVersion'):
|
||||
o = persister.object
|
||||
if o.version < o.__class__.version:
|
||||
print 'object needs upgrade'
|
||||
if o.instanceVersion < o.__class__.classVersion:
|
||||
persister.delete()
|
||||
|
||||
return persister
|
||||
|
||||
Reference in New Issue
Block a user