diff options
Diffstat (limited to 'ipalib/config.py')
-rw-r--r-- | ipalib/config.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ipalib/config.py b/ipalib/config.py index 16bc1371..a0a33b40 100644 --- a/ipalib/config.py +++ b/ipalib/config.py @@ -28,6 +28,7 @@ def generate_env(d={}): server_context = False, query_dns = True, verbose = False, + interactive = True, server = LazyIter(get_servers), realm = LazyProp(get_realm), domain = LazyProp(get_domain), @@ -70,11 +71,14 @@ class LazyIter(LazyProp): yield item -def read_config(config_file=DEFAULT_CONF): - assert isinstance(config_file, (basestring, file)) +def read_config(config_file=None): + assert config_file == None or isinstance(config_file, (basestring, file)) parser = SafeConfigParser() - files = [config_file, os.path.expanduser('~/.ipa.conf')] + if config_file == None: + files = [DEFAULT_CONF, os.path.expanduser('~/.ipa.conf')] + else: + files = [config_file] for f in files: try: |