roboto.waiters
Module Contents
Condition
Interval
TimeoutError
Bases: TimeoutError
A wait gave up before its condition was met.
Subclasses the built-in TimeoutError, so except TimeoutError catches it whether or not the caller imported this class.
Parameters
msg strAttributes
wait_for()
Wait for a condition to be truthy.
Parameters
condition ConditionThe condition to wait for. This should be a callable that returns a boolean.
args Optional[collections.The arguments to pass to the condition callable on each iteration.
timeout floatThe maximum amount of time to wait for the condition to be truthy.
interval IntervalThe amount of time to wait between iterations. This can be an integer or a callable. If it is a callable, it will be called with the iteration number and should return an integer.
timeout_msg strThe message to include in the TimeoutError if the timeout is reached.
Raises
If the timeout is reached before the condition is truthy.
Returns
None