[Erp5-report] r17032 - /erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 17 18:59:28 CEST 2007
Author: romain
Date: Wed Oct 17 18:59:28 2007
New Revision: 17032
URL: http://svn.erp5.org?rev=17032&view=rev
Log:
Change indentation to allow futur extension.
Modified:
erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=17032&r1=17031&r2=17032&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py Wed Oct 17 18:59:28 2007
@@ -1624,26 +1624,28 @@
method = getattr(self, method_name)
if method.meta_type in ("Z SQL Method", "LDIF Method"):
# Build the dictionnary of values
- arguments = method.arguments_src
- for arg in split(arguments):
- value_list = []
- append = value_list.append
- for object in catalogged_object_list:
+ arguments = split(method.arguments_src)
+ else:
+ arguments = []
+ for arg in arguments:
+ value_list = []
+ append = value_list.append
+ for object in catalogged_object_list:
+ try:
+ value = argument_cache[(object.uid, arg)]
+ except KeyError:
try:
- value = argument_cache[(object.uid, arg)]
- except KeyError:
- try:
- value = getattr(object, arg, None)
- if callable(value):
- value = value()
- except ConflictError:
- raise
- except:
- value = None
- if not disable_cache:
- argument_cache[(object.uid, arg)] = value
- append(value)
- kw[arg] = value_list
+ value = getattr(object, arg, None)
+ if callable(value):
+ value = value()
+ except ConflictError:
+ raise
+ except:
+ value = None
+ if not disable_cache:
+ argument_cache[(object.uid, arg)] = value
+ append(value)
+ kw[arg] = value_list
for method_name in method_id_list:
if method_name not in method_kw_dict:
More information about the Erp5-report
mailing list