%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/secretstorage/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/secretstorage/__pycache__/__init__.cpython-312.pyc |
� ��b$ � �� � d Z ddlmZ ddlmZmZmZ ddlmZm Z m Z mZmZm Z mZ ddlmZ ddlmZmZmZmZmZ ddlmZ dZd j5 eee� � Zg d �Zdefd�Zd ede fd�Z!y)zThis file provides quick access to all SecretStorage API. Please refer to documentation of individual modules for API details. � )�message_bus)�DBusConnection�Proxy�open_dbus_connection)� Collection�create_collection�get_all_collections�get_default_collection�get_any_collection�get_collection_by_alias�search_items)�Item)�SecretStorageException�"SecretServiceNotAvailableException�LockedException�ItemNotFoundException�PromptDismissedException)�add_match_rules)� r r �.)r r r r r r r �check_service_availabilityr � dbus_initr r r r r �returnc � � t � } t | � | S # t $ r/}dj |j d � }t |� |�d}~wt t f$ r}t t |� � |�d}~ww xY w)aA Returns a new connection to the session bus, instance of jeepney's :class:`DBusConnection` class. This connection can then be passed to various SecretStorage functions, such as :func:`~secretstorage.collection.get_default_collection`. .. warning:: The D-Bus socket will not be closed automatically. You can close it manually using the :meth:`DBusConnection.close` method, or you can use the :class:`contextlib.closing` context manager: .. code-block:: python from contextlib import closing with closing(dbus_init()) as conn: collection = secretstorage.get_default_collection(conn) items = collection.search_items({'application': 'myapp'}) However, you will not be able to call any methods on the objects created within the context after you leave it. .. versionchanged:: 3.0 Before the port to Jeepney, this function returned an instance of :class:`dbus.SessionBus` class. .. versionchanged:: 3.1 This function no longer accepts any arguments. z Environment variable {} is unsetr N) r r �KeyError�format�argsr �ConnectionError� ValueError�str)� connection�ex�reasons �8/usr/lib/python3/dist-packages/secretstorage/__init__.pyr r , su � �8 B�)�+� �� �#����� A�3�:�:�2�7�7�1�:�F��0��8�b�@���Z�(� B�0��R��9�r�A��B�s � � A8�*A�A8�A3�3A8r! c � � ddl m} t t | � }|j |� d dk( xs ||j � d v S )z�Returns True if the Secret Service daemon is either running or available for activation via D-Bus, False otherwise. .. versionadded:: 3.2 r )�BUS_NAME� )�secretstorage.utilr&