mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 03:55:41 +00:00
shield plugin package load
This commit is contained in:
@ -150,9 +150,12 @@ class Plugins:
|
|||||||
if (not settings.PLUGIN_TESTING) or (settings.PLUGIN_TESTING and settings.PLUGIN_TESTING_SETUP):
|
if (not settings.PLUGIN_TESTING) or (settings.PLUGIN_TESTING and settings.PLUGIN_TESTING_SETUP):
|
||||||
# Collect plugins from setup entry points
|
# Collect plugins from setup entry points
|
||||||
for entry in metadata.entry_points().get('inventree_plugins', []):
|
for entry in metadata.entry_points().get('inventree_plugins', []):
|
||||||
plugin = entry.load()
|
try:
|
||||||
plugin.is_package = True
|
plugin = entry.load()
|
||||||
self.plugin_modules.append(plugin)
|
plugin.is_package = True
|
||||||
|
self.plugin_modules.append(plugin)
|
||||||
|
except Exception as error:
|
||||||
|
get_plugin_error(error, do_log=True, log_name='discovery')
|
||||||
|
|
||||||
# Log collected plugins
|
# Log collected plugins
|
||||||
logger.info(f'Collected {len(self.plugin_modules)} plugins!')
|
logger.info(f'Collected {len(self.plugin_modules)} plugins!')
|
||||||
|
Reference in New Issue
Block a user