From 5ba21d010f30fa379fe8ff534ebba959e1f197cf Mon Sep 17 00:00:00 2001 From: Roberto Lapuente Date: Fri, 15 Jan 2021 11:15:06 +1300 Subject: [PATCH] #467 Update setup.utils.py Add convenience function for building the config dict --- tabpy/models/utils/setup_utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tabpy/models/utils/setup_utils.py b/tabpy/models/utils/setup_utils.py index 10801fb7..01a9fc44 100644 --- a/tabpy/models/utils/setup_utils.py +++ b/tabpy/models/utils/setup_utils.py @@ -13,10 +13,14 @@ def get_default_config_file_path(): return config_file_path -def parse_config(config_file_path): +def get_config(config_file_path): config = configparser.ConfigParser() config.read(config_file_path) - tabpy_config = config["TabPy"] + return config + + +def parse_config(config_file_path): + tabpy_config = get_config(config_file_path)["TabPy"] port = 9004 if "TABPY_PORT" in tabpy_config: