Commit efbccf24 authored by Nicolas Dumazet's avatar Nicolas Dumazet

rename _getItemList so we can use it in other contexts than Utils,

and understand that we're talking of PropertyHolder methods


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42820 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6212a920
......@@ -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)]
......
......@@ -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
......
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