HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/iam.cpython-310.pyc
o

�N�g��@sddZddlZddlZddlZzddlZdZWney!dZYnwe�e�Z	ddd�Z
d	d
�ZdS)z7
Connection library for Amazon IAM

:depends: requests
�NTF�
�cCs�td|�D]e}d}z$tj||ddid�}t|d�r|jWSt|d�r*|jWSWdStjjyC}zWYd}~dSd}~wtyT}zWYd}~nd}~wwt	�
d|�t	�
t�|��t
�d	|�qt	�d
|�dS)zI
    Retry grabbing a URL.
    Based heavily on boto.utils.retry_url
    rN�http�)�timeoutZproxies�text�contentz/Caught exception reading from URL. Retry no. %s�z0Failed to read from URL for %s times. Giving up.)�range�requests�get�hasattrrr�
exceptions�	HTTPError�	Exception�log�warning�pprintZpformat�time�sleep�error)�urlZnum_retriesr�i�exc�result�r�B/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/iam.py�_retry_get_urls*

���rcCs|S)z/
    Stolen completely from boto.providers
    r)�keyrrr�_convert_key_to_str0sr)rr)�__doc__�loggingrrrZHAS_REQUESTS�ImportError�	getLogger�__name__rrrrrrr�<module>s�