1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-07-02 16:58:30 +00:00

Catch all exceptions when loading plugins

This commit is contained in:
Unrud 2017-06-15 23:54:32 +02:00
parent 6f5e30670f
commit 75605b5f03
4 changed files with 12 additions and 12 deletions

View file

@ -75,9 +75,9 @@ def load(configuration, logger):
else:
try:
class_ = import_module(auth_type).Auth
except ImportError as e:
raise RuntimeError("Authentication module %r not found" %
auth_type) from e
except Exception as e:
raise RuntimeError("Failed to load authentication module %r: %s" %
(auth_type, e)) from e
logger.info("Authentication type is %r", auth_type)
return class_(configuration, logger)