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

set_callbacks does not require all items to be callable #96

Open
robberwick opened this issue Apr 6, 2024 · 0 comments
Open

set_callbacks does not require all items to be callable #96

robberwick opened this issue Apr 6, 2024 · 0 comments

Comments

@robberwick
Copy link
Contributor

Expected Behavior

set_callbacks() should fail gracefully if all members are not callable

Actual Behavior

set_callbacks() does not fail when all members are not callable, and the code attempts to invoke the specified item when its index in the callback list corresponds with the packet_id

Steps to Reproduce the Problem

  1. call set_callbacks(), passing a list of non-callable items e.g. strings
  2. set_callbacks invocation does not fail
  3. send SerialTransfer packet with a packet_id whose index corresponds with an item in the list of callbacks
  4. call tick()
  5. script crashes, as callback item is not callable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant