ioflo / hio

Apache License 2.0
8 stars 8 forks source link

Infinite Duration Issue #1

Closed rosenbrockc closed 3 years ago

rosenbrockc commented 3 years ago

By default, the limit on a Doist is None, meaning that it will run forever. During the do method (https://github.com/ioflo/hio/blob/master/src/hio/base/doing.py#L172) a new Tymer is created using that None limit value as the duration. Although the constructor works fine, the Tymer.start method tries to add this duration as a float (https://github.com/ioflo/hio/blob/6c1670a011e3c7b30bf419376498d5ae0344e8a5/src/hio/base/tyming.py#L247)

>       self._stop = self._start + float(duration)  # need for default duration
E       TypeError: float() argument must be a string or a number, not 'NoneType'
SmithSamuelM commented 3 years ago

I think its fixed now. With this 764c69df4f8f8ca864fd2c9e2f0b43dcd6420fbb Let me know and I will bump the version.

Good catch. Did not have an easy way to test infinite run in unit tests so missed it

SmithSamuelM commented 3 years ago

Fixed in release 0.2.4