fix(app): Skip plugins with not satisfied dependencies.
This commit is contained in:
parent
a9674d68ab
commit
aeb4c39a12
|
@ -201,6 +201,7 @@ class Plugin:
|
||||||
Dict containing version and permissions of the plugin
|
Dict containing version and permissions of the plugin
|
||||||
"""
|
"""
|
||||||
from flaschengeist.utils.plugin import plugin_version
|
from flaschengeist.utils.plugin import plugin_version
|
||||||
|
|
||||||
return {"version": plugin_version(self), "permissions": self.permissions}
|
return {"version": plugin_version(self), "permissions": self.permissions}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,9 @@ def get_plugins() -> list[type[Plugin]]:
|
||||||
plugins.append(plugin_class)
|
plugins.append(plugin_class)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
logger.error(f"Invalid entry point for plugin {entry_point.name} found.")
|
logger.error(f"Invalid entry point for plugin {entry_point.name} found.")
|
||||||
|
except pkg_resources.DistributionNotFound:
|
||||||
|
logger.warn(f"Requirements not fulfilled for {entry_point.name}")
|
||||||
|
logger.debug("DistributionNotFound", exc_info=True)
|
||||||
return plugins
|
return plugins
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ def run_migrations_online():
|
||||||
connection=connection,
|
connection=connection,
|
||||||
target_metadata=target_metadata,
|
target_metadata=target_metadata,
|
||||||
process_revision_directives=process_revision_directives,
|
process_revision_directives=process_revision_directives,
|
||||||
**current_app.extensions["migrate"].configure_args
|
**current_app.extensions["migrate"].configure_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
with context.begin_transaction():
|
with context.begin_transaction():
|
||||||
|
|
Loading…
Reference in New Issue