From 17d9c06b07232276156c015daa5692ed9413223e Mon Sep 17 00:00:00 2001 From: Hemna Date: Mon, 17 Apr 2023 15:37:48 -0400 Subject: [PATCH] Don't load help plugin for listen command This patch disables loading the help plugin for the listen command. --- aprsd/cmds/listen.py | 2 +- aprsd/plugin.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/aprsd/cmds/listen.py b/aprsd/cmds/listen.py index 5cecfae..0aa168e 100644 --- a/aprsd/cmds/listen.py +++ b/aprsd/cmds/listen.py @@ -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 " diff --git a/aprsd/plugin.py b/aprsd/plugin.py index a2f6dd1..f882b9b 100644 --- a/aprsd/plugin.py +++ b/aprsd/plugin.py @@ -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: