Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion prevents generation of messages with empty payload #407

Closed
rssen opened this issue Aug 15, 2020 · 0 comments · Fixed by #408
Closed

Assertion prevents generation of messages with empty payload #407

rssen opened this issue Aug 15, 2020 · 0 comments · Fixed by #408
Assignees
Labels
bug pyrflx Related to pyrflx package (Legacy Python API)

Comments

@rssen
Copy link
Contributor

rssen commented Aug 15, 2020

The assertion in line 383 of typevalue.py (assert self._value) prevents the generation of a message with empty payload as it raises an AssertionError when encountering an empty bytes-object.
I'd suggest changing it to assert self._value is not None.

According to our UDP spec, it is possible to create a valid UDP Datagram with empty payload by setting the Length field to 8.

@rssen rssen added the pyrflx Related to pyrflx package (Legacy Python API) label Aug 15, 2020
rssen added a commit that referenced this issue Aug 16, 2020
@treiher treiher added the bug label Aug 17, 2020
@treiher treiher added this to To do in RecordFlux 0.5 via automation Aug 17, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Aug 17, 2020
@treiher treiher assigned treiher and rssen and unassigned treiher Aug 17, 2020
RecordFlux 0.5 automation moved this from In progress to Merged Aug 18, 2020
@treiher treiher mentioned this issue Aug 4, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pyrflx Related to pyrflx package (Legacy Python API)
Projects
No open projects
RecordFlux 0.5
  
Merged
Development

Successfully merging a pull request may close this issue.

2 participants