diff options
author | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2015-07-21 20:52:32 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2015-07-22 00:37:41 +0200 |
commit | 61d90fbfd7397b8042b09b542a547b78d31851e0 (patch) | |
tree | c71ddc07679d76a061e270d6b7ac056661d74d60 /testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py | |
parent | a120c653a8bf2c380cc2d158e5169a9b7d2020a8 (diff) | |
download | bcfg2-61d90fbfd7397b8042b09b542a547b78d31851e0.tar.gz bcfg2-61d90fbfd7397b8042b09b542a547b78d31851e0.tar.bz2 bcfg2-61d90fbfd7397b8042b09b542a547b78d31851e0.zip |
Options: Set default values from config, right after adding a new option
If adding an option during the "Main Parser Loop" (for example because of loading
a component for bcfg-lint) a value for the option from the config file is simply
ignored.
After adding the option, the parser first tries to find the value in the command line,
but cannot find it and set the default value from the source code as option value.
After that the value from the config file is set as new default, but because the
option already is in the Namespace, it does not use the new "default" value from the
config file.
This patch simply sets the default value from the config file for the new options,
right after adding it to the parser and so the correct value is used afterwards, if
the parser cannot find the flag on the command line.
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py')
0 files changed, 0 insertions, 0 deletions