[CMF-checkins] SVN: CMF/trunk/GenericSetup/utils.py Reverted change that breaks export/import.

Florent Guillaume fg at nuxeo.com
Thu Dec 29 18:40:58 EST 2005


Log message for revision 41056:
  Reverted change that breaks export/import.
  This property node/body business and when to use it is really not clear.
  

Changed:
  U   CMF/trunk/GenericSetup/utils.py

-=-
Modified: CMF/trunk/GenericSetup/utils.py
===================================================================
--- CMF/trunk/GenericSetup/utils.py	2005-12-29 22:29:00 UTC (rev 41055)
+++ CMF/trunk/GenericSetup/utils.py	2005-12-29 23:40:57 UTC (rev 41056)
@@ -435,14 +435,8 @@
         """Import the object from the DOM node.
         """
 
-    def __exportNode(self):
-        return self._exportNode()
+    node = property(_exportNode, _importNode)
 
-    def __importNode(self, *args):
-        self._importNode(*args)
-
-    node = property(__exportNode, __importNode)
-
     def _getObjectNode(self, name, i18n=True):
         node = self._doc.createElement(name)
         node.setAttribute('name', self.context.getId())
@@ -482,14 +476,8 @@
         """Import the object from the file body.
         """
 
-    def __exportBody(self):
-        return self._exportBody()
+    body = property(_exportBody, _importBody)
 
-    def __importBody(self, *args):
-        self._importBody(*args)
-
-    body = property(__exportBody, __importBody)
-
     mime_type = 'text/plain'
 
     name = ''
@@ -521,6 +509,8 @@
             raise ExpatError('%s: %s' % (filename, e))
         self._importNode(dom.documentElement)
 
+    body = property(_exportBody, _importBody)
+
     mime_type = 'text/xml'
 
     name = ''



More information about the CMF-checkins mailing list