Skip to content

Commit

Permalink
Fix type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Dec 30, 2024
1 parent cf700c7 commit 455836c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py_trees/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,9 @@ def tick(self) -> typing.Iterator[behaviour.Behaviour]:

# condition check
result = self.condition()
if type(result) == common.Status:
if isinstance(result, common.Status):
result = False if result == common.Status.FAILURE else True
elif type(result) != bool:
elif isinstance(result, bool):
error_message = (
"conditional check must return 'bool' or 'common.Status' [{}]".format(
type(result)
Expand Down

0 comments on commit 455836c

Please sign in to comment.