Import u64 and p64 from canonical locations

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32872 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e8acc96e
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
# Make sure the xml export will be ordered # Make sure the xml export will be ordered
from ZODB.utils import u64, p64
from Shared.DC.xml import ppml from Shared.DC.xml import ppml
from base64 import encodestring from base64 import encodestring
from cStringIO import StringIO from cStringIO import StringIO
...@@ -106,10 +107,10 @@ def XMLrecord(oid, plen, p, id_mapping): ...@@ -106,10 +107,10 @@ def XMLrecord(oid, plen, p, id_mapping):
q=ppml.ToXMLUnpickler q=ppml.ToXMLUnpickler
f=StringIO(p) f=StringIO(p)
u=q(f) u=q(f)
id=ppml.u64(oid) id=u64(oid)
id = id_mapping[id] id = id_mapping[id]
old_aka = encodestring(oid)[:-1] old_aka = encodestring(oid)[:-1]
aka=encodestring(ppml.p64(long(id)))[:-1] # Rebuild oid based on mapped id aka=encodestring(p64(long(id)))[:-1] # Rebuild oid based on mapped id
id_mapping.setConvertedAka(old_aka, aka) id_mapping.setConvertedAka(old_aka, aka)
u.idprefix=str(id)+'.' u.idprefix=str(id)+'.'
p=u.load(id_mapping=id_mapping).__str__(4) p=u.load(id_mapping=id_mapping).__str__(4)
......
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