From 9c0f32c68879f8f04c0c11afbc0c6f711d538176 Mon Sep 17 00:00:00 2001 From: Anton Khizunov Date: Mon, 25 Dec 2023 17:57:31 +0200 Subject: [PATCH] Fix config normalization for dictionary and list variables --- skipper/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skipper/config.py b/skipper/config.py index 9470532..8ee1838 100644 --- a/skipper/config.py +++ b/skipper/config.py @@ -24,13 +24,13 @@ def load_defaults(): def _normalize_config(config, normalized_config): for key, value in six.iteritems(config): + normalized_key = key.replace('-', '_') if isinstance(value, dict): - normalized_config[key] = {} - _normalize_config(value, normalized_config[key]) + normalized_config[normalized_key] = {} + _normalize_config(value, normalized_config[normalized_key]) elif isinstance(value, list): - normalized_config[key] = [_interpolate_env_vars(x) for x in value] + normalized_config[normalized_key] = [_interpolate_env_vars(x) for x in value] else: - normalized_key = key.replace('-', '_') normalized_config[normalized_key] = _interpolate_env_vars(value)