Skip to content

Commit

Permalink
FunctionalCommand: Assert lifecycle functions are callable
Browse files Browse the repository at this point in the history
  • Loading branch information
auscompgeek authored and virtuald committed Jan 20, 2024
1 parent c4ac373 commit 1135dab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions commands2/functionalcommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def __init__(
:param requirements: the subsystems required by this command"""
super().__init__()

assert callable(onInit)
assert callable(onExecute)
assert callable(onEnd)
assert callable(isFinished)

self._onInit = onInit
self._onExecute = onExecute
self._onEnd = onEnd
Expand Down

0 comments on commit 1135dab

Please sign in to comment.