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

Andreas Jung andreas at andreas-jung.com
Sun Mar 26 03:56:07 EST 2006


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

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

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt	2006-03-26 08:55:24 UTC (rev 66165)
+++ Zope/trunk/doc/CHANGES.txt	2006-03-26 08:56:06 UTC (rev 66166)
@@ -202,6 +202,9 @@
 
     Bugs Fixed
 
+      - Applied patch by Yoshinori Okuji to fix some XML export/import
+        problems
+
       - Collector #2037: fixed broken ACTUAL_URL for '/'
 
       - Missing import of NotFound in webdav.Resource

Modified: Zope/trunk/lib/python/Shared/DC/xml/ppml.py
===================================================================
--- Zope/trunk/lib/python/Shared/DC/xml/ppml.py	2006-03-26 08:55:24 UTC (rev 66165)
+++ Zope/trunk/lib/python/Shared/DC/xml/ppml.py	2006-03-26 08:56:06 UTC (rev 66166)
@@ -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