summaryrefslogtreecommitdiffstats
path: root/openstack/common
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-29 16:49:34 +0000
committerGerrit Code Review <review@openstack.org>2012-11-29 16:49:34 +0000
commit93173520d0e7eb8cfba56108e9db35a93cc37ae8 (patch)
treec7b8c8cac334e4f2b1f61860d378926681037997 /openstack/common
parentd8d9136f8e04d36545051b97c613ac57f6657555 (diff)
parent5e9503bf9934f1ccc15985ee29eb76dc04ebad6a (diff)
downloadoslo-93173520d0e7eb8cfba56108e9db35a93cc37ae8.tar.gz
oslo-93173520d0e7eb8cfba56108e9db35a93cc37ae8.tar.xz
oslo-93173520d0e7eb8cfba56108e9db35a93cc37ae8.zip
Merge "Hide the GroupAttr conf and group attributes"
Diffstat (limited to 'openstack/common')
-rw-r--r--openstack/common/cfg.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/openstack/common/cfg.py b/openstack/common/cfg.py
index 767ba1a..dabcf09 100644
--- a/openstack/common/cfg.py
+++ b/openstack/common/cfg.py
@@ -1576,12 +1576,12 @@ class ConfigOpts(collections.Mapping):
:param conf: a ConfigOpts object
:param group: an OptGroup object
"""
- self.conf = conf
- self.group = group
+ self._conf = conf
+ self._group = group
def __getattr__(self, name):
"""Look up an option value and perform template substitution."""
- return self.conf._get(name, self.group)
+ return self._conf._get(name, self._group)
def __getitem__(self, key):
"""Look up an option value and perform string substitution."""
@@ -1589,16 +1589,16 @@ class ConfigOpts(collections.Mapping):
def __contains__(self, key):
"""Return True if key is the name of a registered opt or group."""
- return key in self.group._opts
+ return key in self._group._opts
def __iter__(self):
"""Iterate over all registered opt and group names."""
- for key in self.group._opts.keys():
+ for key in self._group._opts.keys():
yield key
def __len__(self):
"""Return the number of options and option groups."""
- return len(self.group._opts)
+ return len(self._group._opts)
class StrSubWrapper(object):