* 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:
Thomas Vander Stichele
2009-05-25 14:49:36 +00:00
parent 703d9c1a88
commit 10226d062d
2 changed files with 9 additions and 3 deletions

View File

@@ -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:

View File

@@ -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