← Back
Editing: chainer.cpython-311.pyc
� %�cw � �T � d Z ddlmZ ddlmZ ddlmZ G d� dej � � ZdS ) zV Keyring Chainer - iterates over other viable backends to discover passwords in each. � )�backend)� properties� )�failc �n � e Zd ZdZdZej d� � � Zej d� � � Zd� Z d� Z d� Zd� Zd S ) �ChainerBackendzZ >>> ChainerBackend() <keyring.backends.chainer.ChainerBackend object at ...> Tc �^ � t | j � � dk rdnt 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�r���1F��1J�K� c � � d� }t |t j � � � � }t |t j d�� � S )z5 Discover all keyrings for chaining. c � � t j pt }t | t � � o || � � o | j dk S )N� )r �_limit�bool� isinstancer r )�keyring�limits r �allowz&ChainerBackend.backends.<locals>.allow$ sC � ��N�*�d�E��w��7�7�7� )��E�'�N�N�)��$�q�(� r T)�key�reverse)�filterr �get_all_keyring�sorted�by_priority)r r �alloweds r r zChainerBackend.backends sC � � � � � ��� 7� 9� 9�:�:���g�7�#6��E�E�E�Er c �R � | j D ]}|� ||� � }|�|c S �d S �N)r �get_password)�self�service�usernamer �passwords r r$ zChainerBackend.get_password/ sF � ��}� � �G��+�+�G�X�>�>�H��#����� $� � r c �l � | j D ]+} |� |||� � c S # t $ r Y �(w xY wd S r# )r �set_password�NotImplementedError)r% r&