Skip to content

set_callbacks does not require all items to be callable #96

@robberwick

Description

@robberwick

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions