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

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 31 18:55:58 CEST 2010


Author: nicolas
Date: Mon May 31 18:55:56 2010
New Revision: 35826

URL: http://svn.erp5.org?rev=35826&view=rev
Log:
no need to use try except assertion with fallback parameter

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=35826&r1=35825&r2=35826&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/Conduit/ERP5Conduit.py [utf8] Mon May 31 18:55:56 2010
@@ -1045,10 +1045,7 @@
       object_id = xml.get('id')
     if object_id is not None:
       if sub_object is None:
-        try:
-          sub_object = object._getOb(object_id)
-        except (AttributeError, KeyError, TypeError):
-          sub_object = None
+        sub_object = object._getOb(object_id, None)
       if sub_object is None: # If so, it doesn't exist
         portal_type = ''
         if xml.xpath('local-name()') == self.xml_object_tag:




More information about the Erp5-report mailing list