Skip to content
Snippets Groups Projects
Commit 6cc4fcf2 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #1619 from matrix-org/erikj/pwd_provider_error

Don't assume providers raise ConfigError's
parents e6651e80 ac507e7a
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from ._base import Config
from ._base import Config, ConfigError
import importlib
......@@ -39,7 +39,12 @@ class PasswordAuthProviderConfig(Config):
module = importlib.import_module(module)
provider_class = getattr(module, clz)
provider_config = provider_class.parse_config(provider["config"])
try:
provider_config = provider_class.parse_config(provider["config"])
except Exception as e:
raise ConfigError(
"Failed to parse config for %r: %r" % (provider['module'], e)
)
self.password_providers.append((provider_class, provider_config))
def default_config(self, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment