1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-17 22:01:49 -05:00

Don't load help plugin for listen command

This patch disables loading the help plugin for the listen command.
This commit is contained in:
Hemna 2023-04-17 15:37:48 -04:00
parent 66ebb286d8
commit 17d9c06b07
2 changed files with 5 additions and 4 deletions

View File

@ -185,7 +185,7 @@ def listen(
pm = plugin.PluginManager()
if load_plugins:
LOG.info("Loading plugins")
pm.setup_plugins()
pm.setup_plugins(load_help_plugin=False)
else:
LOG.warning(
"Not Loading any plugins use --load-plugins to load what's "

View File

@ -455,13 +455,14 @@ class PluginManager:
del self._pluggy_pm
self.setup_plugins()
def setup_plugins(self):
def setup_plugins(self, load_help_plugin=True):
"""Create the plugin manager and register plugins."""
LOG.info("Loading APRSD Plugins")
# Help plugin is always enabled.
_help = HelpPlugin()
self._pluggy_pm.register(_help)
if load_help_plugin:
_help = HelpPlugin()
self._pluggy_pm.register(_help)
enabled_plugins = CONF.enabled_plugins
if enabled_plugins: