Commit b6be9c26 authored by Julien Muchembled's avatar Julien Muchembled

ExternalMethod: revert getFunction() to return a function as its name suggests

Commit b45914fa changed the return value of
getFunction() to return more information. But it's easy to preserve the
previous API for any code that would use it, and anyway, it became misnamed.
parent c3a504cc
......@@ -25,13 +25,16 @@ class _(PatchClass(ExternalMethod)):
@property
def func_defaults(self):
return self.getFunction()[1]
return self._getFunction()[1]
@property
def func_code(self):
return self.getFunction()[2]
return self._getFunction()[2]
def getFunction(self, reload=False):
return self._getFunction(reload)[0]
def _getFunction(self, reload=False):
try:
component_module = __import__(
'erp5.component.extension.' + self._module,
......@@ -92,7 +95,7 @@ class _(PatchClass(ExternalMethod)):
"""
self.checkGuard(True)
_f = self.getFunction()
_f = self._getFunction()
__traceback_info__ = args, kw, _f[1]
if _f[3]:
......
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