When i try to export a PluggableAuthService object as XML, (with ZMI
Import/Export or with manage_exportObject?id=acl_users&download=1&toxml=Y)
i get the following exception:

  Error Type: AttributeError
  Error Value: List instance has no attribute 'extend'


  Traceback (innermost last):

    * Module ZPublisher.Publish, line 101, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 39, in call_object
    * Module OFS.ObjectManager, line 504, in manage_exportObject
    * Module OFS.XMLExportImport, line 58, in exportXML
    * Module OFS.XMLExportImport, line 33, in XMLrecord
    * Module Shared.DC.xml.ppml, line 253, in load
    * Module pickle, line 872, in load
    * Module pickle, line 1209, in load_appends

Seems that the xml export calls the "extend" method of an
Shared.DC.xml.ppml.List object, which isnt implemented.

The following patch (implement "extend" like "append") solves the problem
(for me!):

[EMAIL PROTECTED]:~$ diff -u -U10 
--- Zope-2.7.2/lib/python/Shared/DC/xml/ppml.py.ori     2002-08-14 
23:51:00.000000000 +0200
+++ Zope-2.7.2/lib/python/Shared/DC/xml/ppml.py 2004-11-10 23:05:55.000000000 
@@ -209,20 +209,22 @@
 class Sequence(Collection):
     def __init__(self, v=None):
         if not v: v=[]
     def __len__(self): return len(self._subs)
     def append(self, v): self._subs.append(v)
+    def extend(self, v): self._subs.extend(v)
     def value(self, indent):


[EMAIL PROTECTED]                Fax: +43/1/31336/9207
Zentrum fuer Informatikdienste, Wirtschaftsuniversitaet Wien, Austria
Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to