[plugins] Improved handling of plugin loading errors
This commit is contained in:
parent
4e46ea1ca3
commit
cadde543f2
|
@ -54,6 +54,8 @@ def __load_plugins(app):
|
|||
logger.error(
|
||||
f"Plugin {entry_point.name} was enabled, but could not be loaded due to an error.", exc_info=True
|
||||
)
|
||||
del plugin
|
||||
continue
|
||||
if isinstance(plugin, AuthPlugin):
|
||||
logger.debug(f"Found authentication plugin: {entry_point.name}")
|
||||
if entry_point.name == config["FLASCHENGEIST"]["auth"]:
|
||||
|
@ -65,6 +67,7 @@ def __load_plugins(app):
|
|||
app.config["FG_PLUGINS"][entry_point.name] = plugin
|
||||
if "FG_AUTH_BACKEND" not in app.config:
|
||||
logger.error("No authentication plugin configured or authentication plugin not found")
|
||||
raise RuntimeError("No authentication plugin configured or authentication plugin not found")
|
||||
|
||||
|
||||
def install_all():
|
||||
|
|
Loading…
Reference in New Issue