From 58cb046b3131f4300255c527dee4c7291a4aeed2 Mon Sep 17 00:00:00 2001 From: Walter Boring Date: Mon, 22 Sep 2025 10:25:31 -0400 Subject: [PATCH] Sanity check around decoding packet This adds another sanity try, except block at the APRSDClient level call for decode_packet, just in case the driver itself fails in it's decode_packet() call. --- aprsd/client/client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aprsd/client/client.py b/aprsd/client/client.py index 942ad5d..191854e 100644 --- a/aprsd/client/client.py +++ b/aprsd/client/client.py @@ -138,4 +138,9 @@ class APRSDClient: return self.driver.consumer(callback=callback, raw=raw) def decode_packet(self, *args, **kwargs) -> core.Packet: - return self.driver.decode_packet(*args, **kwargs) + try: + packet = self.driver.decode_packet(*args, **kwargs) + except Exception as e: + LOG.error(f'Error decoding packet: {e}') + return None + return packet