[Erp5-report] r35820 nicolas - /erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 31 18:42:47 CEST 2010


Author: nicolas
Date: Mon May 31 18:42:44 2010
New Revision: 35820

URL: http://svn.erp5.org?rev=35820&view=rev
Log:
Use simplier condition expression

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

Modified: erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py?rev=35820&r1=35819&r2=35820&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py [utf8] Mon May 31 18:42:44 2010
@@ -272,7 +272,7 @@
           return conflict_list
         if keyword is None: # This is not a selection, directly the property
           keyword = xml.xpath('name()')
-        if not (keyword in self.NOT_EDITABLE_PROPERTY):
+        if keyword not in self.NOT_EDITABLE_PROPERTY:
           # We will look for the data to enter
           xpath_expression = xml.get('select', xpath_expression)
           context = self.getContextFromXpath(object, xpath_expression)
@@ -288,7 +288,7 @@
           #last synchronization
           #   - current_data : the data actually on this box
           isConflict = False
-          if (previous_xml is not None) and (not force):
+          if previous_xml is not None and not force:
           # if no previous_xml, no conflict
             #old_data = self.getObjectProperty(keyword, previous_xml,
                                               #data_type=data_type)
@@ -318,7 +318,7 @@
                 conflict.setRemoteValue(data)
               conflict_list += [conflict]
           # We will now apply the argument with the method edit
-          if args != {} and (isConflict == 0 or force) and \
+          if args and (not isConflict or force) and \
               (not simulate or reset):
             self._updateContent(object=context, **args)
             # It is sometimes required to do something after an edit




More information about the Erp5-report mailing list