Commit 748b5d93 authored by Nicolas Dumazet's avatar Nicolas Dumazet

reduce code duplication


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42609 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dc64ee1e
...@@ -464,9 +464,7 @@ class PropertyHolder: ...@@ -464,9 +464,7 @@ class PropertyHolder:
""" """
Return the list of workflow method IDs Return the list of workflow method IDs
""" """
return [x[0] for x in self._getItemList() if isinstance(x[1], WorkflowMethod) return [x[0] for x in self.getWorkflowMethodItemList()]
or (isinstance(x[1], types.TupleType)
and x[1] is WORKFLOW_METHOD_MARKER)]
def _getClassDict(self, klass, inherited=1, local=1): def _getClassDict(self, klass, inherited=1, local=1):
""" """
...@@ -499,8 +497,7 @@ class PropertyHolder: ...@@ -499,8 +497,7 @@ class PropertyHolder:
""" """
Return the list of class method IDs Return the list of class method IDs
""" """
return [x[0] for x in self._getClassItemList(klass, inherited=inherited, return [x[0] for x in self.getClassMethodItemList()]
local=local) if callable(x[1]) and not isinstance(x[1], Method)]
def getClassPropertyItemList(self, klass, inherited=1, local=1): def getClassPropertyItemList(self, klass, inherited=1, local=1):
""" """
...@@ -513,8 +510,7 @@ class PropertyHolder: ...@@ -513,8 +510,7 @@ class PropertyHolder:
""" """
Return the list of class method IDs Return the list of class method IDs
""" """
return [x[0] for x in self._getClassItemList(klass, inherited=inherited, return [x[0] for x in self.getClassPropertyItemList()]
local=local) if not callable(x[1])]
def getClassPropertyList(klass): def getClassPropertyList(klass):
ps_list = getattr(klass, 'property_sheets', ()) ps_list = getattr(klass, 'property_sheets', ())
......
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