From 725bb2fe35d6adf0cd56e2a866bee0233c46534a Mon Sep 17 00:00:00 2001 From: Hemna Date: Thu, 7 Oct 2021 10:05:19 -0400 Subject: [PATCH] Fixed send-message after config/client rework This patch fixes the send-message from the command line ability after the complete rework of the client classes. --- aprsd/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aprsd/main.py b/aprsd/main.py index 3e911da..fea3d84 100644 --- a/aprsd/main.py +++ b/aprsd/main.py @@ -351,8 +351,8 @@ def send_message( sys.exit(0) try: - cl = client.Client(config) - cl.setup_connection() + client.ClientFactory.setup(config) + client.factory.create().client except LoginError: sys.exit(-1) @@ -379,7 +379,7 @@ def send_message( # This will register a packet consumer with aprslib # When new packets come in the consumer will process # the packet - aprs_client = client.get_client() + aprs_client = client.factory.create().client aprs_client.consumer(rx_packet, raw=False) except aprslib.exceptions.ConnectionDrop: LOG.error("Connection dropped, reconnecting") @@ -387,7 +387,7 @@ def send_message( # Force the deletion of the client object connected to aprs # This will cause a reconnect, next time client.get_client() # is called - cl.reset() + aprs_client.reset() # main() ###