summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-05-24 15:32:01 -0400
committerGitHub <noreply@github.com>2021-05-24 15:32:01 -0400
commit7adcb20fc02d614b4a2b03b128b279f25633e2bd (patch)
tree00bfca91a453c3611274f28a27d58b979ad9f104 /synapse/config
parentFix docker image to not log at `/homeserver.log` (#10045) (diff)
downloadsynapse-7adcb20fc02d614b4a2b03b128b279f25633e2bd.tar.xz
Add missing type hints to synapse.util (#9982)
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/saml2.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/config/saml2.py b/synapse/config/saml2.py
index 3d1218c8d1..05e983625d 100644
--- a/synapse/config/saml2.py
+++ b/synapse/config/saml2.py
@@ -164,7 +164,13 @@ class SAML2Config(Config):
         config_path = saml2_config.get("config_path", None)
         if config_path is not None:
             mod = load_python_module(config_path)
-            _dict_merge(merge_dict=mod.CONFIG, into_dict=saml2_config_dict)
+            config = getattr(mod, "CONFIG", None)
+            if config is None:
+                raise ConfigError(
+                    "Config path specified by saml2_config.config_path does not "
+                    "have a CONFIG property."
+                )
+            _dict_merge(merge_dict=config, into_dict=saml2_config_dict)
 
         import saml2.config