관리-도구
편집 파일: retry.cpython-311.pyc
� �Dgp � � � d dl Z d dlmZmZ d dlmZmZ d dlmZ ed� � Z ed� � Z deded eee e f gee e f f fd �ZdS )� N)�perf_counter�sleep)�Callable�TypeVar)� ParamSpec�T�P�wait�stop_after_delay�returnc �| � �� dt t t f dt t t f f�� fd�}|S )a� Decorator to automatically retry a function on error. If the function raises, the function is recalled with the same arguments until it returns or the time limit is reached. When the time limit is surpassed, the last exception raised is reraised. :param wait: The time to wait after an error before retrying, in seconds. :param stop_after_delay: The time limit after which retries will cease, in seconds. �funcr c � �� � t j � � � dt j dt j dt f� ��fd�� � }|S )N�args�kwargsr c � �� t � � } �| i |��S # t $ r( t � � |z �k r� t �� � Y nw xY w�?)N)r � Exceptionr )r r � start_timer r r s ����y/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/utils/retry.py� retry_wrappedz-retry.<locals>.wrapper.<locals>.retry_wrapped st �� � &���J� � ��4��0��0�0�0�� � � � �#�~�~� �2�5E�E�E���$�K�K�K�K�K� ���� s � �/A�A)� functools�wrapsr r r r )r r r r s ` ��r �wrapperzretry.<locals>.wrapper sb ��� � ��� � � ��� �1�8� �� � � � � � � � � � � �� )r r r )r r r s `` r �retryr sL ��� ��h�q�!�t�n� ��!�Q�$�� � � � � � � �"