diff --git a/ipalib/plugable.py b/ipalib/plugable.py index e017a8a42..801ef7ab5 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))