HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/timeout.cpython-310.pyc
o

�N�g#�@s,ddlZddlZe�e�ZdZddd�ZdS)	�Ngffffff�?�
��c	Cs�|durt�}t��|}t|pd|�t}|}t��|kr@||i|��}|r*|}nt�|�t||t���t}t��|kst��|krMt�d||�|S)a}
    Call `func` at regular intervals and Waits until the given function returns
    a truthy value within the given timeout and returns that value.

    @param func:
    @type func: function
    @param timeout:
    @type timeout: int | float
    @param step: Interval at which we should check for the value
    @type step: int | float
    @param default: Value that should be returned should `func` not return a truthy value
    @type default:
    @param func_args: *args for `func`
    @type func_args: list | tuple
    @param func_kwargs: **kwargs for `func`
    @type func_kwargs: dict
    @return: `default` or result of `func`
    Nrz1Exceeded waiting time (%s seconds) to exectute %s)�dict�time�min�BLUR_FACTOR�sleep�log�warning)	�func�timeout�step�defaultZ	func_argsZfunc_kwargsZmax_time�retZcall_retrr�F/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/timeout.py�wait_for
s 
�
r)rrNrN)�loggingr�	getLogger�__name__r
rrrrrr�<module>s