Skip to content

Commit

Permalink
[timer][fix] Fix duration type check for Timer (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
naveedhd authored Dec 30, 2024
1 parent caefcc2 commit d0b3214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py_trees/timers.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Timer(behaviour.Behaviour):

def __init__(self, name: str = "Timer", duration: float = 5.0):
super(Timer, self).__init__(name)
if not isinstance(duration, float):
if not isinstance(duration, (int, float)):
raise TypeError(
"Timer: duration should be int or float, but you passed in {}".format(
type(duration)
Expand Down

0 comments on commit d0b3214

Please sign in to comment.