[Erp5-report] r29925 - in /erp5/trunk/products/ERP5SyncML: Conduit/ERP5Conduit.py SyncCode.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 22 14:35:18 CEST 2009


Author: nicolas
Date: Thu Oct 22 14:35:15 2009
New Revision: 29925

URL: http://svn.erp5.org?rev=29925&view=rev
Log:
rename constant XUPDATE_EL to XUPDATE_ELEMENT

Modified:
    erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py
    erp5/trunk/products/ERP5SyncML/SyncCode.py

Modified: erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py?rev=29925&r1=29924&r2=29925&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py [utf8] Thu Oct 22 14:35:15 2009
@@ -312,7 +312,7 @@
         data = None
         if xml.xpath('name()') not in self.XUPDATE_INSERT_OR_ADD:
           for subnode in xml:
-            if subnode.xpath('name()') in self.XUPDATE_EL:
+            if subnode.xpath('name()') in self.XUPDATE_ELEMENT:
               keyword = subnode.attrib.get('name', None)
               data_xml = subnode
         else:
@@ -790,14 +790,14 @@
     """
     Retrieve the list of xupdate:element subnodes
     """
-    return xml.xpath('|'.join(['.//*[name() = "%s"]' % name for name in self.XUPDATE_EL]))
+    return xml.xpath('|'.join(['.//*[name() = "%s"]' % name for name in self.XUPDATE_ELEMENT]))
 
   security.declareProtected(Permissions.AccessContentsInformation,'getElementFromXupdate')
   def getElementFromXupdate(self, xml):
     """
     from a xupdate:element returns the element as xml
     """
-    if xml.xpath('name()') in self.XUPDATE_EL:
+    if xml.xpath('name()') in self.XUPDATE_ELEMENT:
       result = '<'
       tag_name = xml.attrib.get('name')
       result += tag_name
@@ -843,7 +843,7 @@
     Return the list of workflow actions
     """
     action_list = []
-    if xml.xpath('name()') in self.XUPDATE_EL:
+    if xml.xpath('name()') in self.XUPDATE_ELEMENT:
       action_list.append(xml)
       return action_list
     for subnode in xml:

Modified: erp5/trunk/products/ERP5SyncML/SyncCode.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/SyncCode.py?rev=29925&r1=29924&r2=29925&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/SyncCode.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/SyncCode.py [utf8] Thu Oct 22 14:35:15 2009
@@ -85,7 +85,7 @@
   XUPDATE_ADD =           ('xupdate:append',)
   XUPDATE_DEL =           ('xupdate:remove',)
   XUPDATE_UPDATE =        ('xupdate:update',)
-  XUPDATE_EL =        ('xupdate:element',)
+  XUPDATE_ELEMENT =        ('xupdate:element',)
   XUPDATE_INSERT_OR_ADD = tuple(XUPDATE_INSERT) + tuple(XUPDATE_ADD)
   XUPDATE_TAG = tuple(XUPDATE_INSERT) + tuple(XUPDATE_ADD) + \
                 tuple(XUPDATE_UPDATE) + tuple(XUPDATE_DEL)
@@ -110,7 +110,7 @@
                      local_group_tag,'/'+local_group_tag)
   ADDABLE_PROPERTY = local_role_list + (history_tag,) + local_permission_list
   NOT_EDITABLE_PROPERTY = ('id','object','uid','xupdate:attribute') \
-                          + XUPDATE_EL + ADDABLE_PROPERTY
+                          + XUPDATE_ELEMENT + ADDABLE_PROPERTY
   sub_object_exp = re.compile("/object\[@id='.*'\]/")
   object_exp = re.compile("/object\[@id='.*'\]")
   attribute_type_exp = re.compile("^.*attribute::type$")




More information about the Erp5-report mailing list