diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-12-23 01:28:00 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-12-23 01:28:00 -0700 |
commit | f7cae9a27cde3346783809cbf949762b0c0708f1 (patch) | |
tree | bc9a0f56b7b850cb2f7432223b119b25f5223138 /ipalib/config.py | |
parent | 16526142f36e81f4d8a767f339c559188485f756 (diff) | |
download | freeipa-f7cae9a27cde3346783809cbf949762b0c0708f1.tar.gz freeipa-f7cae9a27cde3346783809cbf949762b0c0708f1.tar.xz freeipa-f7cae9a27cde3346783809cbf949762b0c0708f1.zip |
More docstring cleanup in Env and its methods
Diffstat (limited to 'ipalib/config.py')
-rw-r--r-- | ipalib/config.py | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/ipalib/config.py b/ipalib/config.py index c39d99a99..8c602cdc3 100644 --- a/ipalib/config.py +++ b/ipalib/config.py @@ -165,8 +165,8 @@ class Env(object): environment variables can be set during the remaining life of the process. - However, normally none of the above methods are called directly and only - `ipalib.plugable.API.bootstrap()` is called instead. + However, normally none of the above methods are called directly and instead + only `ipalib.plugable.API.bootstrap()` is called. """ __locked = False @@ -280,9 +280,10 @@ class Env(object): """ Initialize basic environment. - This method will initialize only enough environment information to - determine whether ipa is running in-tree, what the context is, - and the location of the configuration file. + In addition to certain run-time information, this method will + initialize only enough environment information to determine whether + IPA is running in-tree, what the context is, and the location of the + configuration file. """ self.__doing('_bootstrap') @@ -322,11 +323,12 @@ class Env(object): After this method is called, the all environment variables used by all the built-in plugins will be available. - This method should be called before loading any plugins. It will + This method should be called before loading any plugins. It will automatically call `Env._bootstrap()` if it has not yet been called. After this method has finished, the `Env` instance is still writable - so that third + so that 3rd-party plugins can set variables they may require as the + plugins are registered. """ self.__doing('_finalize_core') self.__do_if_not_done('_bootstrap') @@ -349,8 +351,17 @@ class Env(object): """ Finalize and lock environment. - This method should be called after all plugins have bean loaded and - after `plugable.API.finalize()` has been called. + This method should be called after all plugins have been loaded and + after `plugable.API.finalize()` has been called. This method will + automatically call `Env._finalize_core()` if it hasn't been called + already, but in normal operation this would result in an exception + being raised because the internal default values will not have been + merged-in. + + After this method finishes, the `Env` instance will be locked and no + more environment variables can be set. Aside from unit-tests and + example code, normally only one `Env` instance is created, meaning + no more variables can be set during the remaining life of the process. """ self.__doing('_finalize') self.__do_if_not_done('_finalize_core') |