summaryrefslogtreecommitdiffstats
path: root/ipalib/config.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-11-07 02:26:38 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-11-07 02:26:38 -0700
commitc26a3c8542472a2d3931c7dc82edfd684354af6b (patch)
tree030555d2843fde84da6c7cc49140634c07545afd /ipalib/config.py
parent5bdf860647c5d5825791d50a94b34fbd9a7a71a9 (diff)
downloadfreeipa-c26a3c8542472a2d3931c7dc82edfd684354af6b.tar.gz
freeipa-c26a3c8542472a2d3931c7dc82edfd684354af6b.tar.xz
freeipa-c26a3c8542472a2d3931c7dc82edfd684354af6b.zip
Finished fist draft of plugin tutorial in ipalib/__init__.py docstring
Diffstat (limited to 'ipalib/config.py')
-rw-r--r--ipalib/config.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/ipalib/config.py b/ipalib/config.py
index 02a3fadd9..aa7d9cdf3 100644
--- a/ipalib/config.py
+++ b/ipalib/config.py
@@ -202,8 +202,8 @@ class Env(object):
"""
self.__doing('_finalize_core')
self.__do_if_not_done('_bootstrap')
- self._merge_config(self.conf)
- if self.conf_default != self.conf:
+ if self.__d.get('mode', None) != 'dummy':
+ self._merge_config(self.conf)
self._merge_config(self.conf_default)
if 'in_server' not in self:
self.in_server = (self.context == 'server')
@@ -335,7 +335,13 @@ class Env(object):
"""
return key in self.__d
- def __iter__(self): # Fix
+ def __len__(self):
+ """
+ Return number of variables currently set.
+ """
+ return len(self.__d)
+
+ def __iter__(self):
"""
Iterate through keys in ascending order.
"""