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__/config.cpython-310.pyc
o

�2.a��@shddlZddlZddlZddlmZej�dd�ZdZe�	e
�Zddd�Zd	d
�Z
dd�Zdd
d�ZdS)�N�)�IS_WINDOWS_PLATFORMz.dockerzconfig.jsonz
.dockercfgc
Cs�ttd|t�tj�t�t�tj�t�t�g��}t	�
dt|����|D]}tj�|�r8t	�
d|���|Sq$t	�
d�dS)NzTrying paths: zFound file at path: zNo config file found)
�list�filter�config_path_from_environment�os�path�join�home_dir�DOCKER_CONFIG_FILENAME�LEGACY_DOCKER_CONFIG_FILENAME�log�debug�repr�exists)�config_path�pathsr�r�5/usr/lib/python3/dist-packages/docker/utils/config.py�find_config_file
s��
rcCs*tj�d�}|s
dStj�|tj�t��S)N�
DOCKER_CONFIG)r�environ�getrr	�basenamer)�
config_dirrrrr!srcCstr	tj�dd�Stj�d�S)z�
    Get the user's home directory, using the same logic as the Docker Engine
    client - use %USERPROFILE% on Windows, $HOME/getuid on POSIX.
    �USERPROFILE��~)rrrrr�
expanduserrrrrr
(sr
c
Cs�t|�}|siSzt|��}t�|�Wd�WS1swYWnttfy=}zt�|�WYd}~nd}~wwt�d�iS)Nz4All parsing attempts failed - returning empty config)r�open�json�load�OSError�
ValueErrorr
r)r�config_file�f�errr�load_general_config3s
&���
r')N)r �loggingr�	constantsrrr	rr�	getLogger�__name__r
rrr
r'rrrr�<module>s