Added 'conf_dir' env variable, which is directory containing config files

This commit is contained in:
Jason Gerard DeRose 2008-11-10 15:53:10 -07:00
parent 174af50f6d
commit 9aa14333a4
3 changed files with 4 additions and 1 deletions

View File

@ -520,7 +520,7 @@ This will typically be called before any plugins are registered. For example:
7
>>> api.bootstrap(in_server=True) # We want to execute, not forward
>>> len(api.env)
33
34
If your plugin requires new environment variables *and* will be included in
the freeIPA built-in plugins, you should add the defaults for your variables

View File

@ -186,6 +186,8 @@ class Env(object):
self.conf = path.join(base, '%s.conf' % self.context)
if 'conf_default' not in self:
self.conf_default = path.join(base, 'default.conf')
if 'conf_dir' not in self:
self.conf_dir = base
def _finalize_core(self, **defaults):
"""

View File

@ -115,6 +115,7 @@ DEFAULT_CONFIG = (
('context', None), # Name of context, default is 'default'
('conf', None), # Path to config file
('conf_default', None), # Path to common default config file
('conf_dir', None), # Directory containing config files
# Set in Env._finalize_core():
('in_server', None), # Whether or not running in-server (bool)