%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/keyring/backends/__pycache__/ |
| Current File : //lib/python3/dist-packages/keyring/backends/__pycache__/chainer.cpython-312.pyc |
�
�e� � �V � d Z ddlmZ ddlmZ ddlmZ G d� dej � Zy) zV
Keyring Chainer - iterates over other viable backends to
discover passwords in each.
� )�backend)�
properties� )�failc �z � e Zd ZdZdZej defd�� Zej d� � Z d� Z
d� Zd� Zd � Z
y
)�ChainerBackendzZ
>>> ChainerBackend()
<keyring.backends.chainer.ChainerBackend object at ...>
T�returnc �p � t | j � dkD rdS t j j dz
S )z�
If there are backends to chain, high priority
Otherwise very low priority since our operation when empty
is the same as null.
r �
)�len�backendsr �Keyring�priority)�clss �:/usr/lib/python3/dist-packages/keyring/backends/chainer.pyr zChainerBackend.priority s. � � ����&��*�r�K����1F�1F��1J�K� c �| � d� }t |t j � � }t |t j d�� S )z5
Discover all keyrings for chaining.
c � � t j xs t }t | t � xr || � xr | j
dkD S )N� )r �_limit�bool�
isinstancer r )�keyring�limits r �allowz&ChainerBackend.backends.<locals>.allow$ sA � ��N�N�*�d�E��w��7�7� )��'�N�)��$�$�q�(�
r T)�key�reverse)�filterr �get_all_keyring�sorted�by_priority)r r �alloweds r r
zChainerBackend.backends s3 � � � ��� 7� 7� 9�:���g�7�#6�#6��E�Er c �V � | j D ] }|j ||� }|��|c S y �N)r
�get_password)�self�service�usernamer �passwords r r% zChainerBackend.get_password/ s2 � ��}�}� �G��+�+�G�X�>�H��#��� r c �n � | j D ] } |j |||� c S y # t $ r Y �&w xY wr$ )r
�set_password�NotImplementedError)r&