From 1c50c39e6104d6e9462fd9ed5e2deed7f9e6b1fe Mon Sep 17 00:00:00 2001 From: Hemna Date: Wed, 20 Nov 2024 18:01:21 -0500 Subject: [PATCH] Updated server client checks Moved the client settings and configuration checks prior to trying to start the client. --- aprsd/cmds/server.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/aprsd/cmds/server.py b/aprsd/cmds/server.py index a355478..bf418a6 100644 --- a/aprsd/cmds/server.py +++ b/aprsd/cmds/server.py @@ -54,6 +54,15 @@ def server(ctx, flush): LOG.error("No Clients are enabled in config.") sys.exit(-1) + # Make sure we have 1 client transport enabled + if not client_factory.is_client_enabled(): + LOG.error("No Clients are enabled in config.") + sys.exit(-1) + + if not client_factory.is_client_configured(): + LOG.error("APRS client is not properly configured in config file.") + sys.exit(-1) + # Creates the client object LOG.info("Creating client connection") aprs_client = client_factory.create() @@ -86,15 +95,6 @@ def server(ctx, flush): for p in watchlist_plugins: LOG.info(p) - # Make sure we have 1 client transport enabled - if not client_factory.is_client_enabled(): - LOG.error("No Clients are enabled in config.") - sys.exit(-1) - - if not client_factory.is_client_configured(): - LOG.error("APRS client is not properly configured in config file.") - sys.exit(-1) - if not CONF.enable_seen_list: # just deregister the class from the packet collector packet_collector.PacketCollector().unregister(seen_list.SeenList)