summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipalib/plugable.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index e017a8a4..801ef7ab 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -132,6 +132,7 @@ class Proxy(ReadOnly):
"""
__slots__ = (
+ '__call__',
'__obj',
'name',
)
@@ -145,6 +146,8 @@ class Proxy(ReadOnly):
assert isinstance(proxy_name, str)
object.__setattr__(self, '_Proxy__obj', obj)
object.__setattr__(self, 'name', proxy_name)
+ if callable(obj):
+ object.__setattr__(self, '__call__', obj.__call__)
#for name in self.__slots__:
# object.__setattr__(self, name, getattr(obj, name))