[Zope-Checkins] SVN: Zope/branches/2.9/ - Applied patch by Yoshinori Okuji to fix some XML export/import

Andreas Jung andreas at andreas-jung.com
Sun Mar 26 03:54:42 EST 2006


Log message for revision 66164:
        - Applied patch by Yoshinori Okuji to fix some XML export/import
          problems
  

Changed:
  U   Zope/branches/2.9/doc/CHANGES.txt
  U   Zope/branches/2.9/lib/python/Shared/DC/xml/ppml.py

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.9/doc/CHANGES.txt	2006-03-25 17:22:53 UTC (rev 66163)
+++ Zope/branches/2.9/doc/CHANGES.txt	2006-03-26 08:54:40 UTC (rev 66164)
@@ -18,6 +18,9 @@
 
     Bugs fixed
 
+      - Applied patch by Yoshinori Okuji to fix some XML export/import
+        problems
+
       - Missing import of NotFound in webdav.Resource.
 
       - Collector #2037: fixed broken ACTUAL_URL for '/'

Modified: Zope/branches/2.9/lib/python/Shared/DC/xml/ppml.py
===================================================================
--- Zope/branches/2.9/lib/python/Shared/DC/xml/ppml.py	2006-03-25 17:22:53 UTC (rev 66163)
+++ Zope/branches/2.9/lib/python/Shared/DC/xml/ppml.py	2006-03-26 08:54:40 UTC (rev 66164)
@@ -414,14 +414,14 @@
     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 @@
         '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,



More information about the Zope-Checkins mailing list