Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/spacepackets/ccsds/spacepacket.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,12 @@ def packet_len(self) -> int:
def unpack(cls, data: bytes | bytearray) -> SpacePacketHeader:
"""Unpack a raw space packet into the space packet header instance.

:raise ValueError: Raw packet length invalid
Raises
-------
BytesTooShortError
Raw packet is too short to contain a CCSDS Header
ValueError
Raw packet length invalid
"""
if len(data) < SPACE_PACKET_HEADER_SIZE:
raise BytesTooShortError(SPACE_PACKET_HEADER_SIZE, len(data))
Expand Down