Skip to content

Commit

Permalink
Fix type check properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Dec 30, 2024
1 parent 455836c commit 8f59519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py_trees/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def tick(self) -> typing.Iterator[behaviour.Behaviour]:
result = self.condition()
if isinstance(result, common.Status):
result = False if result == common.Status.FAILURE else True
elif isinstance(result, bool):
elif not isinstance(result, bool):
error_message = (
"conditional check must return 'bool' or 'common.Status' [{}]".format(
type(result)
Expand Down

0 comments on commit 8f59519

Please sign in to comment.