From 4fe445fcc3b4bc3d2a92e1fff6baa0c87a5cd3b2 Mon Sep 17 00:00:00 2001 From: Karl-Hermann Wieners <karl-hermann.wieners@mpimet.mpg.de> Date: Thu, 14 Dec 2023 23:54:39 +0100 Subject: [PATCH] Tools: only check default config version if file exists --- expconfig.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/expconfig.py b/expconfig.py index 87ffed3..c4b8b30 100644 --- a/expconfig.py +++ b/expconfig.py @@ -499,9 +499,10 @@ class ExpConfig(ConfigObj): lib_config_name = get_config_name(ExpConfig.exp_lib_dir, ExpConfig.default_name+'.config') - pre_config.merge(ConfigObj(lib_config_name)) - split_shared_sections(pre_config) - register_version(pre_config, config_versions) + if os.path.exists(lib_config_name): + pre_config.merge(ConfigObj(lib_config_name)) + split_shared_sections(pre_config) + register_version(pre_config, config_versions) if os.path.exists(setup_config_name): pre_config.merge(ConfigObj(setup_config_name)) -- GitLab