This class extends the Config class to provide the policy
functionality and meaning over a regular constant configuration object.
This means that all the subsections are always expanded with the values
from the default section recursively upon loading the policy.
Secondly, the get() function has been overridden so that the default
value is returned if the specified subsection or attribute doesn't exist.
The purpose of this behaviour is to always provide new groups with the
default policy.
|
|
__init__(self,
name,
source=None,
load=True,
merge_default=False)
Initialize the Config class and load the configuration if `load` is
True |
source code
|
|
|
|
load(self,
configfile=None,
merge_default=False)
This function loads the policy from `configfile` and if
`merge_default` is set to True, merges the default values into all
the subsections as well. |
source code
|
|
|
|
get(self,
path=[])
This function is a short form for get_branch |
source code
|
|
|
Inherited from config.Config:
attributes,
clear,
compare_to,
get_branch,
print_all,
save,
sections,
set
|