U
    [e                     @   s|   d dl 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 )    Nc                   C   s   t jt jd dS )NUSERPROFILEzLocal Settings)ospathjoinenviron r   r   X/var/www/html/services/stratfitenv/lib/python3.8/site-packages/keyring/util/platform_.py_settings_root_XP   s    r	   c                   C   s   t jdt jddS )NLOCALAPPDATAZ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 )zW
    Use freedesktop.org Base Dir Specification to determine storage
    location.
    z.local/shareXDG_DATA_HOMENpython_keyring)pathlibPathhomer   r   r   r   r   )fallbackr   r   r   r   _data_root_Linux   s    r   c                  C   sd   dd t  d< tjt d} tjt d}tj|r`tj| s`d| d|  d}t|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>*       z(_check_old_config_root.<locals>.<lambda>_check_old_config_rootzkeyringrc.cfgz/Keyring config exists only in the old location z and should be moved to z& to work with this version of keyring.N)globalsr   r   r   _config_root_Linuxr   isfileRuntimeError)Zconfig_file_newZconfig_file_oldmsgr   r   r   r    !   s    	r    c                  C   s8   t   tj d } d}tj|dp(| }tj|dS )zV
    Use freedesktop.org Base Dir Specification to determine config
    location.
    z.configXDG_CONFIG_HOMENr   )	r    r   r   r   r   r   r   r   r   )r   keyr   r   r   r   r"   6   s
    r"   Z_data_root_Z_config_root)r   r   r   r	   r   r   r   Z_config_root_Windowsr    r"   r!   r   systemZ	data_rootZconfig_rootr   r   r   r   <module>   s   
