more robust

This commit is contained in:
Robin Müller 2021-12-16 16:07:59 +01:00
parent 4e2d561b96
commit 8cfc2892dd

View File

@ -24,6 +24,9 @@ def ccsds_tm_handler(apid: int, raw_tm_packet: bytearray, tmtc_printer: TmTcPrin
def pus_factory_hook(raw_tm_packet: bytearray, tmtc_printer: TmTcPrinter):
if len(raw_tm_packet) < 8:
LOGGER.warning("Detected packet shorter than 8 bytes!")
return
service_type = raw_tm_packet[7]
tm_packet = None
try: