Fix pickle.dumps problem in grampstype and eventref -- bug 2210
svn: r10814
This commit is contained in:
parent
de6b1f80c2
commit
63f6b44481
@ -49,7 +49,12 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase):
|
||||
to the refereneced event.
|
||||
"""
|
||||
|
||||
__slots__=('.__role')
|
||||
__slots__=('__role')
|
||||
|
||||
def __getstate__(self):
|
||||
return{'__role': self.__role}
|
||||
def __setstate__(self,dict_):
|
||||
self.__role = dict_('__role')
|
||||
|
||||
def __init__(self, source=None):
|
||||
"""
|
||||
|
@ -96,6 +96,12 @@ class GrampsType(object):
|
||||
__metaclass__ = GrampsTypeMeta
|
||||
__slots__ = ('__value','__string')
|
||||
|
||||
def __getstate__(self):
|
||||
return {'__value': self.__value,'__string': self.__string}
|
||||
def __setstate__(self,dict_):
|
||||
self.__value = dict_['__value']
|
||||
self.__string = dict_['__string']
|
||||
|
||||
@classmethod
|
||||
def __class_init__(cls, namespace):
|
||||
cls._I2SMAP = _init_map(cls._DATAMAP, 0, 1, cls._BLACKLIST)
|
||||
|
Loading…
Reference in New Issue
Block a user