Commit 41c2cbc7 authored by Jim Fulton's avatar Jim Fulton

Renamed the module to prevent package attr conflicts.

Added code to support old pickles. This error was causing
attribute errors on 'data'.
parent 8e385fe7
......@@ -14,9 +14,9 @@
"""Python implementation of persistent base types
$Id: PersistentMapping.py,v 1.22 2003/11/28 16:44:46 jim Exp $"""
$Id: mapping.py,v 1.1 2003/12/15 06:56:46 jim Exp $"""
__version__='$Revision: 1.22 $'[11:-2]
__version__='$Revision: 1.1 $'[11:-2]
import Persistence
import persistent
......@@ -31,3 +31,9 @@ if Persistence.Persistent is not persistent.Persistent:
Unless you actually want ExtensionClass semantics, use
persistent.mapping.PersistentMapping instead.
"""
def __setstate__(self, state):
if 'data' not in state:
state['data'] = state['_container']
del state['_container']
self.__dict__.update(state)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment