diff options
author | Michael Fenn <fennm@deshawresearch.com> | 2014-03-19 14:38:43 -0400 |
---|---|---|
committer | Michael Fenn <fennm@deshawresearch.com> | 2014-03-19 14:38:43 -0400 |
commit | 2e537cbc66486e3adcc550b19e496e723d61a0b6 (patch) | |
tree | 210a554e06f2ece73a2cb3929d5a4a341eb576f3 /tools | |
parent | 76dc01280761e2b4566c0afa6ae00ab752b7a2fd (diff) | |
download | bcfg2-2e537cbc66486e3adcc550b19e496e723d61a0b6.tar.gz bcfg2-2e537cbc66486e3adcc550b19e496e723d61a0b6.tar.bz2 bcfg2-2e537cbc66486e3adcc550b19e496e723d61a0b6.zip |
Options: call _set_defaults_from_config before _parse_config_options
_set_defaults_from_config must be called before _parse_config_options
This is due to a tricky interaction between the two methods:
(1) _set_defaults_from_config does what its name implies, it updates
the "default" property of each Option based on the value that exists
in the config.
(2) _parse_config_options will look at each option and set it to the
default value that is _currently_ defined. If the option does not
exist in the namespace, it will be added. The method carefully
avoids overwriting the value of an option that is already defined in
the namespace.
Thus, if _set_defaults_from_config has not been called yet when
_parse_config_options is called, all config file options will get set
to their hardcoded defaults. This process defines the options in the
namespace and _parse_config_options will never look at them again.
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions