summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-08 20:55:08 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-08 20:55:08 +0000
commit6dc60a18c7929e3a1f0fee6aeb06913cc8921ccc (patch)
tree1153372d7de49e10acbae41fd0fa325d9174186d /ipalib/plugable.py
parentb0976a520858ccc1120c2cf5aabfc5e03a065ced (diff)
downloadfreeipa.git-6dc60a18c7929e3a1f0fee6aeb06913cc8921ccc.tar.gz
freeipa.git-6dc60a18c7929e3a1f0fee6aeb06913cc8921ccc.tar.xz
freeipa.git-6dc60a18c7929e3a1f0fee6aeb06913cc8921ccc.zip
84: Renamed Proxy.__public to Proxy.__public__ so it works with Abstract.implements()
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 4032b574..ad3d5872 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -144,8 +144,8 @@ class Proxy(ReadOnly):
'__base',
'__target',
'__name_attr',
- '__public',
'name',
+ '__public__',
)
def __init__(self, base, target, name_attr='name'):
@@ -156,26 +156,26 @@ class Proxy(ReadOnly):
object.__setattr__(self, '_Proxy__base', base)
object.__setattr__(self, '_Proxy__target', target)
object.__setattr__(self, '_Proxy__name_attr', name_attr)
- object.__setattr__(self, '_Proxy__public', base.__public__)
+ object.__setattr__(self, '__public__', base.__public__)
object.__setattr__(self, 'name', getattr(target, name_attr))
- # Check __public
- assert type(self.__public) is frozenset
+ # Check __public__
+ assert type(self.__public__) is frozenset
# Check name
check_identifier(self.name)
def __iter__(self):
- for name in sorted(self.__public):
+ for name in sorted(self.__public__):
yield name
def __getitem__(self, key):
- if key in self.__public:
+ if key in self.__public__:
return getattr(self.__target, key)
raise KeyError('no proxy attribute %r' % key)
def __getattr__(self, name):
- if name in self.__public:
+ if name in self.__public__:
return getattr(self.__target, name)
raise AttributeError('no proxy attribute %r' % name)