Don't load main config twice

Before, the main_config (e.g. 'configuration.py' or 'ldap_config.py') were loaded twice.
The first load was hard-coded and correct.
The second load was during the discovery phase for dynamic configurations.
This has now been fixed. During the discovery for dynamic configurations,
the main_config file is now excluded.

Thanks @tobiasge for discovering this bug.
This commit is contained in:
Christian Mäder 2021-02-23 22:50:16 +01:00
parent 009eb1fc6d
commit 95976f4cf4
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ def read_configurations(config_module, config_dir, main_config):
if not f.name.endswith(".py"):
continue
if f.name == f"{main_config}.py":
continue
if f.name == f"{config_dir}.py":
continue