HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/root/usr/lib/python3/dist-packages/docker/utils/__pycache__/decorators.cpython-310.pyc
o

�2.a�@s<ddlZddlmZddlmZdd�Zdd	�Zd
d�ZdS)�N�)�errors�)�utilsc��fdd�}|S)Ncst���d��fdd�	�}|S)Ncs^|dur|���r|���}t|t�r|�d|�d��}|s#t�d���||g|�Ri|��S)N�Id�IDzResource ID was not provided)�get�pop�
isinstance�dictr�NullResource)�self�resource_id�args�kwargs)�f�
resource_name��9/usr/lib/python3/dist-packages/docker/utils/decorators.py�wrapped	s

�z2check_resource.<locals>.decorator.<locals>.wrapped)N��	functools�wraps)rr�r�rr�	decorators
z!check_resource.<locals>.decoratorr)rrrrr�check_resources
rcr)Ncst�����fdd��}|S)Ncs8t�|j��rt�d��j�����|g|�Ri|��S)Nz${} is not available for version < {})r�
version_lt�_versionr�InvalidVersion�format�__name__�rrr)r�versionrr�wrappers��z3minimum_version.<locals>.decorator.<locals>.wrapperr)rr%�r$rrrsz"minimum_version.<locals>.decoratorr)r$rrr&r�minimum_versionsr'cr)NcsNd|jvr|�d�s|jd|d<n
|d�|jd��|g|�Ri|��S)N�HttpHeaders�headers)�_general_configsr	�updater#rrr�inner(s


zupdate_headers.<locals>.innerr)rr,rrr�update_headers'sr-)r�rrrr'r-rrrr�<module>s