summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-06 14:59:54 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-06 14:59:54 +0000
commit4e825ba2d9d292af17acdecb2e7f739c3355a464 (patch)
treeeae533132aa053cb686749bfa6146120b01e3925 /ipalib/plugable.py
parent293b31ac75cd4f72c5d4a62ffc82df83c70f564f (diff)
downloadfreeipa.git-4e825ba2d9d292af17acdecb2e7f739c3355a464.tar.gz
freeipa.git-4e825ba2d9d292af17acdecb2e7f739c3355a464.tar.xz
freeipa.git-4e825ba2d9d292af17acdecb2e7f739c3355a464.zip
61: Proxy now does a setattr for all callable attributes in __slots__ (and uses __getattr__ for rest
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index fe4a4531..4a790a37 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -131,7 +131,6 @@ class Proxy(ReadOnly):
"""
__slots__ = (
- '__call__',
'__obj',
'name',
)
@@ -145,10 +144,10 @@ class Proxy(ReadOnly):
check_identifier(proxy_name)
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))
+ for name in self.__slots__:
+ attr = getattr(obj, name)
+ if callable(attr):
+ object.__setattr__(self, name, attr)
def __repr__(self):
return '%s(%r)' % (self.__class__.__name__, self.__obj)