kaitai_struct_python_runtime
kaitai_struct_python_runtime copied to clipboard
read_bytes_term() should raise EOFError instead of Exception
read_bytes_term()
should raise EOFError instead of Exception to be consistent with read_bytes()
.
Btw. it's funny that found this issue 1h later than the person that has reported #40
Even if #40 is implemented using a custom class, I'd suggest having both read_bytes_term()
and read_bytes()
raise the same type of error.
My use case is that I'm trying to detect when the packet that I'm parsing has been truncated so it would be helpful to be able to just do except EOFError
(or except kaitaistruct.EOFError
) instead of having to parse the exception message.