Brian Coca 3 weeks ago committed by Abhijeet Kasurde
parent 63f57904c4
commit 6ed4fa9afc

@ -96,7 +96,7 @@ class ConfigCLI(CLI):
super(ConfigCLI, self).__init__(args, callback)
# we don't want 'dynamic' constants
C.force_preload()
C._force_preload()
def init_parser(self):

@ -83,9 +83,9 @@ class _DeprecatedSequenceConstant(Sequence):
def __getattr__(config_constant):
''' Handle dynamicall generating a 'constant' when first requested,
""" Handle dynamicall generating a 'constant' when first requested,
otherwise just return it from cached value.
'''
"""
if config_constant not in globals():
try:
@ -267,8 +267,9 @@ MAGIC_VARIABLE_MAPPING = dict(
)
def force_preload():
def _force_preload():
""" read all available constants, used for config dumps """
# NOTE: previous templating dependencies should already be covered, order does not matter anymore
for setting in config.get_configuration_definitions():
set_constant(setting, config.get_config_value(setting, variables=vars()))

Loading…
Cancel
Save