From 8865f516dfbffaee0da679c47aa2709ec8f5d80f Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Wed, 6 Aug 2008 03:51:33 +0000 Subject: [PATCH] 56: Fixed Proxy.__call__ --- ipalib/plugable.py | 3 +++ 1 file changed, 3 insertions(+) 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))