[Erp5-report] r42820 nicolas.dumazet - in /erp5/trunk/products/ERP5Type: ./ dynamic/
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 31 14:52:26 CET 2011
Author: nicolas.dumazet
Date: Mon Jan 31 14:52:26 2011
New Revision: 42820
URL: http://svn.erp5.org?rev=42820&view=rev
Log:
rename _getItemList so we can use it in other contexts than Utils,
and understand that we're talking of PropertyHolder methods
Modified:
erp5/trunk/products/ERP5Type/Base.py
erp5/trunk/products/ERP5Type/dynamic/accessor_holder.py
Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=42820&r1=42819&r2=42820&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Mon Jan 31 14:52:26 2011
@@ -329,7 +329,7 @@ class PropertyHolder(object):
self._constraints = []
self.constraints = []
- def _getItemList(self):
+ def _getPropertyHolderItemList(self):
return [x for x in self.__dict__.items() if x[0] not in
PropertyHolder.RESERVED_PROPERTY_SET]
@@ -437,7 +437,7 @@ class PropertyHolder(object):
"""
accessor_method_item_list = []
accessor_method_item_list_append = accessor_method_item_list.append
- for x, y in self._getItemList():
+ for x, y in self._getPropertyHolderItemList():
if isinstance(y, tuple):
if y is PropertyHolder.WORKFLOW_METHOD_MARKER or x == '__ac_permissions__':
continue
@@ -460,7 +460,7 @@ class PropertyHolder(object):
"""
Return a list of tuple (id, method) for every workflow method
"""
- return [x for x in self._getItemList() if isinstance(x[1], WorkflowMethod)
+ return [x for x in self._getPropertyHolderItemList() if isinstance(x[1], WorkflowMethod)
or (isinstance(x[1], types.TupleType)
and x[1] is PropertyHolder.WORKFLOW_METHOD_MARKER)]
Modified: erp5/trunk/products/ERP5Type/dynamic/accessor_holder.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/dynamic/accessor_holder.py?rev=42820&r1=42819&r2=42820&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/dynamic/accessor_holder.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/dynamic/accessor_holder.py [utf8] Mon Jan 31 14:52:26 2011
@@ -85,7 +85,7 @@ class AccessorHolderType(type):
# Set all the accessors (defined by a tuple) from the Property
# Holder to the new accessor holder class (code coming from
# createAccessor in Base.PropertyHolder)
- for id, fake_accessor in property_holder._getItemList():
+ for id, fake_accessor in property_holder._getPropertyHolderItemList():
if not isinstance(fake_accessor, tuple):
continue
More information about the Erp5-report
mailing list