better exception handling

This commit is contained in:
Robin Müller 2023-06-07 16:56:43 +02:00
parent 6182369e4f
commit de02d81e1d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ def pus_factory_hook(
return
try:
tm_packet = PusTelemetry.unpack(packet, CdsShortTimestamp.empty())
except ValueError:
except ValueError as value_error:
_LOGGER.warning(f"{value_error}")
_LOGGER.warning("Could not generate PUS TM object from raw data")
_LOGGER.warning(f"Raw Packet: [{packet.hex(sep=',')}], REPR: {packet!r}")
return