Commit 47f5c2ba authored by Andreas Jung's avatar Andreas Jung

      - Applied patch by Yoshinori Okuji to fix some XML export/import
        problems
parent 12f7e5c0
......@@ -18,6 +18,9 @@ Zope Changes
Bugs fixed
- Applied patch by Yoshinori Okuji to fix some XML export/import
problems
- Collector #2037: fixed broken ACTUAL_URL for '/'
- Collector #2039: 'ZPublisher.HTTPRequest.HTTPRequest._authUserPW'
......
......@@ -414,14 +414,14 @@ class ToXMLUnpickler(Unpickler):
def load_binput(self):
i = mloads('i' + self.read(1) + '\000\000\000')
last = self.stack[-1]
if getattr(last, 'id', last) is not last:
if getattr(last, 'id', last) is last:
last.id = self.idprefix + `i`
dispatch[BINPUT] = load_binput
def load_long_binput(self):
i = mloads('i' + self.read(4))
last = self.stack[-1]
if getattr(last, 'id', last) is not last:
if getattr(last, 'id', last) is last:
last.id = self.idprefix + `i`
dispatch[LONG_BINPUT] = load_long_binput
......@@ -643,10 +643,10 @@ class xmlPickler(NoBlanks, xyap):
'pickle': lambda self, tag, attrs: [tag, attrs],
}
end_handlers={
'pickle': lambda self, tag, data: data[2]+'.',
'pickle': lambda self, tag, data: str(data[2])+'.',
'none': lambda self, tag, data: 'N',
'int': save_int,
'long': lambda self, tag, data: 'L'+data[2]+'L\012',
'long': lambda self, tag, data: 'L'+str(data[2])+'L\012',
'float': save_float,
'string': save_string,
'reference': save_reference,
......
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