[py] Handle when timeout is 0 and not treat as Boolean
class Timeouts(object):
- def __init__(self, implicit_wait=None, page_load=None, script=None):
+ def __init__(self, implicit_wait=0, page_load=0, script=0):
"""
Create a new Timeout object.
@@ -77,7 +77,6 @@ class Timeouts(object):
self._script = self._convert(_script)
def _convert(self, timeout):
- if timeout:
if isinstance(timeout, (int, float)):
return int(float(timeout) * 1000)
else:
