[Erp5-report] r42495 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 20 08:37:42 CET 2011


Author: nicolas.dumazet
Date: Thu Jan 20 08:37:42 2011
New Revision: 42495

URL: http://svn.erp5.org?rev=42495&view=rev
Log:
less indentation

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=42495&r1=42494&r2=42495&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Thu Jan 20 08:37:42 2011
@@ -697,13 +697,14 @@ def initializePortalTypeDynamicWorkflowM
           method.registerTransitionAlways(ptype, wf_id, transition_id)
       method.registerTransitionAlways(ptype, wf_id, tr_id)
 
-  if interaction_workflow_dict:
-    # only compute once this (somehow) costly list
-    all_method_id_list = prop_holder.getAccessorMethodIdList() + \
-                         prop_holder.getWorkflowMethodIdList() + \
-                         prop_holder.getClassMethodIdList(klass)
-  else:
-    all_method_id_list = []
+  if not interaction_workflow_dict:
+    return
+
+  # only compute once this (somehow) costly list
+  all_method_id_list = prop_holder.getAccessorMethodIdList() + \
+                       prop_holder.getWorkflowMethodIdList() + \
+                       prop_holder.getClassMethodIdList(klass)
+
   # XXX This part is (more or less...) a copy and paste
   # We need to run this part twice in order to handle interactions of interactions
   # ex. an interaction workflow creates a workflow method which matches
@@ -716,7 +717,7 @@ def initializePortalTypeDynamicWorkflowM
         if wildcard_interaction_method_id_match(imethod_id):
           # Interactions workflows can use regexp based wildcard methods
           method_id_matcher = re.compile(imethod_id) # XXX What happens if exception ?
-            # XXX - class stuff is missing here
+          # XXX - class stuff is missing here
           method_id_list = filter(method_id_matcher.match, all_method_id_list)
         else:
           # Single method



More information about the Erp5-report mailing list