summaryrefslogtreecommitdiffstats
path: root/ipalib/config.py
diff options
context:
space:
mode:
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.
"""