Skip to content

Commit d0b3214

Browse files
authored
[timer][fix] Fix duration type check for Timer (#456)
1 parent caefcc2 commit d0b3214

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py_trees/timers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Timer(behaviour.Behaviour):
5454

5555
def __init__(self, name: str = "Timer", duration: float = 5.0):
5656
super(Timer, self).__init__(name)
57-
if not isinstance(duration, float):
57+
if not isinstance(duration, (int, float)):
5858
raise TypeError(
5959
"Timer: duration should be int or float, but you passed in {}".format(
6060
type(duration)

0 commit comments

Comments
 (0)