Commit fac868db authored by Yusei Tahara's avatar Yusei Tahara

patch again for pickling reduce type object.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18663 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 905f9c84
No related merge requests found
......@@ -662,6 +662,28 @@ def save_unicode(self, tag, data):
ppml.save_unicode = save_unicode
def save_object(self, tag, data):
if len(data)==5:
#OBJECT
v='('+data[2]
x=data[3][1:]
stop=string.rfind(x,'t') # This seems
if stop>=0: x=x[:stop] # wrong!
v=save_put(self, v+x+'o', data[1])
v=v+data[4]+'b' # state
return v
else:
#REDUCE
#data does not contain state.(See Object.__setstate__ definition)
#So, we can assume that this is a reduce. (Yusei)
v='('+data[2]
v=save_put(self, data[2]+data[3], data[1])
v=v+'R'
return v
ppml.save_object = save_object
class xmlPickler(NoBlanks, xyap):
# XXX fix a bug in xyap.
def unknown_endtag(self, tag):
......
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