From ec974f0a20a2bf2507a51c24fa2b1f05e0cb8388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=93=D1=80?= =?UTF-8?q?=D0=BE=D0=B7=D0=BD=D1=8B=D1=85?= Date: Wed, 23 Sep 2020 22:24:04 +0300 Subject: [PATCH] Config model refactoring #2 --- cfg/config.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cfg/config.py b/cfg/config.py index 9ceee4a..91ec502 100644 --- a/cfg/config.py +++ b/cfg/config.py @@ -14,13 +14,13 @@ def getConfigAsJson(): except FileNotFoundError as exc: logFileNotFoundErrorAndReraise() -def getGlobalConfigSettingsNames(json_config): - return [setting_name for setting_name in json_config.keys()] +def representConfigValuesAsDict(json_config): + def getGlobalConfigSettingsNames(json_config): + return [setting_name for setting_name in json_config.keys()] -def getGlobalConfigValues(json_config): - return [config_value for config_value in json_config.values()] + def getGlobalConfigValues(json_config): + return [config_value for config_value in json_config.values()] -def representConfigValuesAsDict(config_settings_names, config_values): - return { k:v for k in config_settings_names for v in global_config_values } + return { k:v for k in getGlobalConfigSettingsNames(json_config) for v in getGlobalConfigValues(json_config) }