mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Catch all exceptions when loading plugins
This commit is contained in:
parent
6f5e30670f
commit
75605b5f03
4 changed files with 12 additions and 12 deletions
|
@ -63,9 +63,9 @@ def load(configuration, logger):
|
|||
else:
|
||||
try:
|
||||
rights_class = import_module(rights_type).Rights
|
||||
except ImportError as e:
|
||||
raise RuntimeError("Rights module %r not found" %
|
||||
rights_type) from e
|
||||
except Exception as e:
|
||||
raise RuntimeError("Failed to load rights module %r: %s" %
|
||||
(rights_type, e)) from e
|
||||
logger.info("Rights type is %r", rights_type)
|
||||
return rights_class(configuration, logger).authorized
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue