diff --git a/aprsd/dev.py b/aprsd/dev.py index 01eecc1..23fb608 100644 --- a/aprsd/dev.py +++ b/aprsd/dev.py @@ -190,7 +190,9 @@ def test_plugin( client.Client(config) pm = plugin.PluginManager(config) + pm._init() obj = pm._create_class(plugin_path, plugin.APRSDPluginBase, config=config) + pm._pluggy_pm.register(obj) login = config["aprs"]["login"] packet = { @@ -200,7 +202,7 @@ def test_plugin( "msgNo": 1, } - reply = obj.filter(packet) + reply = pm.run(packet) # Plugin might have threads, so lets stop them so we can exit. obj.stop_threads() LOG.info(f"Result = '{reply}'") diff --git a/aprsd/main.py b/aprsd/main.py index 010d8ad..af88327 100644 --- a/aprsd/main.py +++ b/aprsd/main.py @@ -464,6 +464,9 @@ def server( LOG.error("No Clients are enabled in config.") sys.exit(-1) + # Creates the client object + client.factory.create().client + # Create the initial PM singleton and Register plugins plugin_manager = plugin.PluginManager(config) plugin_manager.setup_plugins()