summary refs log tree commit diff
path: root/synapse/config/key.py
diff options
context:
space:
mode:
authorJonathan de Jong <jonathan@automatia.nl>2021-03-16 19:19:27 +0100
committerGitHub <noreply@github.com>2021-03-16 14:19:27 -0400
commit27d2820c33d94cd99aea128b6ade76a7de838c3d (patch)
treec81628d58ab2daf1184f1654df34ed0d2be30cd2 /synapse/config/key.py
parentAdd SSO attribute requirements for OIDC providers (#9609) (diff)
downloadsynapse-27d2820c33d94cd99aea128b6ade76a7de838c3d.tar.xz
Enable flake8-bugbear, but disable most checks. (#9499)
* Adds B00 to ignored checks.
* Fixes remaining issues.
Diffstat (limited to 'synapse/config/key.py')
-rw-r--r--synapse/config/key.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/config/key.py b/synapse/config/key.py
index de964dff13..350ff1d665 100644
--- a/synapse/config/key.py
+++ b/synapse/config/key.py
@@ -404,7 +404,11 @@ def _parse_key_servers(key_servers, federation_verify_certificates):
     try:
         jsonschema.validate(key_servers, TRUSTED_KEY_SERVERS_SCHEMA)
     except jsonschema.ValidationError as e:
-        raise ConfigError("Unable to parse 'trusted_key_servers': " + e.message)
+        raise ConfigError(
+            "Unable to parse 'trusted_key_servers': {}".format(
+                e.message  # noqa: B306, jsonschema.ValidationError.message is a valid attribute
+            )
+        )
 
     for server in key_servers:
         server_name = server["server_name"]