Commit 3ffd6919 authored by Romain Courteaud's avatar Romain Courteaud

Change indentation to allow futur extension.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17032 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 577992b7
...@@ -1624,26 +1624,28 @@ class Catalog( Folder, ...@@ -1624,26 +1624,28 @@ class Catalog( Folder,
method = getattr(self, method_name) method = getattr(self, method_name)
if method.meta_type in ("Z SQL Method", "LDIF Method"): if method.meta_type in ("Z SQL Method", "LDIF Method"):
# Build the dictionnary of values # Build the dictionnary of values
arguments = method.arguments_src arguments = split(method.arguments_src)
for arg in split(arguments): else:
value_list = [] arguments = []
append = value_list.append for arg in arguments:
for object in catalogged_object_list: value_list = []
append = value_list.append
for object in catalogged_object_list:
try:
value = argument_cache[(object.uid, arg)]
except KeyError:
try: try:
value = argument_cache[(object.uid, arg)] value = getattr(object, arg, None)
except KeyError: if callable(value):
try: value = value()
value = getattr(object, arg, None) except ConflictError:
if callable(value): raise
value = value() except:
except ConflictError: value = None
raise if not disable_cache:
except: argument_cache[(object.uid, arg)] = value
value = None append(value)
if not disable_cache: kw[arg] = value_list
argument_cache[(object.uid, arg)] = value
append(value)
kw[arg] = value_list
for method_name in method_id_list: for method_name in method_id_list:
if method_name not in method_kw_dict: if method_name not in method_kw_dict:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment