o
    œ¨ÊhÑ  ã                   @   s€   d dl mZ d dlZd dlZdd„ Zdd„ Zdd„ Zd	d
„ ZeZdd„ Z	dd„ Z
eƒ  de ¡  e¡Zeƒ  de ¡  e
¡ZdS )é    )Úabsolute_importNc                   C   s   t j t jd d¡S )NÚUSERPROFILEzLocal Settings)ÚosÚpathÚjoinÚenviron© r   r   úH/var/www/html/env/lib/python3.10/site-packages/keyring/util/platform_.pyÚ_settings_root_XP   s   r
   c                   C   s   t j dt j dd¡¡S )NÚLOCALAPPDATAÚProgramDataÚ.)r   r   Úgetr   r   r   r	   Ú_settings_root_Vista   s   r   c                  C   s2   t  ¡ \} }}}| dkrtƒ ntƒ }tj |d¡S )NÚXPzPython Keyring)ÚplatformÚ	win32_verr
   r   r   r   r   )ÚreleaseÚversionÚcsdÚptypeÚrootr   r   r	   Ú_data_root_Windows   s   r   c                  C   s,   t j d¡} t j dd¡p| }t j |d¡S )zV
    Use freedesktop.org Base Dir Specfication to determine storage
    location.
    ú~/.local/shareÚXDG_DATA_HOMENÚpython_keyring)r   r   Ú
expanduserr   r   r   )Úfallbackr   r   r   r	   Ú_data_root_Linux   s   r   c                  C   sh   dd„ t ƒ d< tj tƒ d¡} tj tƒ d¡}tj |¡r0tj | ¡s2d}t|jdi t	ƒ ¤Žƒ‚dS dS )a  
    Prior versions of keyring would search for the config
    in XDG_DATA_HOME, but should probably have been
    searching for config in XDG_CONFIG_HOME. If the
    config exists in the former but not in the latter,
    raise a RuntimeError to force the change.
    c                   S   s   d S )Nr   r   r   r   r	   Ú<lambda>+   s    z(_check_old_config_root.<locals>.<lambda>Ú_check_old_config_rootzkeyringrc.cfgz�Keyring config exists only in the old location {config_file_old} and should be moved to {config_file_new} to work with this version of keyring.Nr   )
Úglobalsr   r   r   Ú_config_root_Linuxr   ÚisfileÚRuntimeErrorÚformatÚlocals)Úconfig_file_newÚconfig_file_oldÚmsgr   r   r	   r    "   s   	ür    c                  C   s6   t ƒ  tj d¡} d}tj |d¡p| }tj |d¡S )zU
    Use freedesktop.org Base Dir Specfication to determine config
    location.
    r   ÚXDG_CONFIG_HOMENr   )r    r   r   r   r   r   r   )r   Úkeyr   r   r   r	   r"   5   s
   r"   Ú_data_root_Ú_config_root)Ú
__future__r   r   r   r
   r   r   r   Ú_config_root_Windowsr    r"   r!   r   ÚsystemÚ	data_rootÚconfig_rootr   r   r   r	   Ú<module>   s"    
ÿý