Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/stevedore/__pycache__/named.cpython-39.pyc
Ðазад
a n�h� � @ s2 d dl Z ddlmZ e �e�ZG dd� de�ZdS )� N� )�ExtensionManagerc sd e Zd ZdZddi ddddddf dd�Zedd d ��Zd� fdd� Z� fd d�Z� fdd�Z � Z S )�NamedExtensionManageran Loads only the named extensions. This is useful for explicitly enabling extensions in a configuration file, for example. :param namespace: The namespace for the entry points. :type namespace: str :param names: The names of the extensions to load. :type names: list(str) :param invoke_on_load: Boolean controlling whether to invoke the object returned by the entry point after the driver is loaded. :type invoke_on_load: bool :param invoke_args: Positional arguments to pass when invoking the object returned by the entry point. Only used if invoke_on_load is True. :type invoke_args: tuple :param invoke_kwds: Named arguments to pass when invoking the object returned by the entry point. Only used if invoke_on_load is True. :type invoke_kwds: dict :param name_order: If true, sort the loaded extensions to match the order used in ``names``. :type name_order: bool :param propagate_map_exceptions: Boolean controlling whether exceptions are propagated up through the map call or whether they are logged and then ignored :type propagate_map_exceptions: bool :param on_load_failure_callback: Callback function that will be called when an entrypoint can not be loaded. The arguments that will be provided when this is called (when an entrypoint fails to load) are (manager, entrypoint, exception) :type on_load_failure_callback: function :param on_missing_entrypoints_callback: Callback function that will be called when one or more names cannot be found. The provided argument will be a subset of the 'names' parameter. :type on_missing_entrypoints_callback: function :param verify_requirements: Use setuptools to enforce the dependencies of the plugin(s) being loaded. Defaults to False. :type verify_requirements: bool :param warn_on_missing_entrypoint: Flag to control whether failing to load a plugin is reported via a log mess. Only applies if on_missing_entrypoints_callback is None. :type warn_on_missing_entrypoint: bool F� NTc C sz | j |||||d� | �|||| �}t|�dd� |D � | _| jrl| rR| | j� n|rlt�dd�| j� � | �|� d S )N)� name_order�propagate_map_exceptions�on_load_failure_callbackc S s h | ] }|j �qS r ��name��.0�er r �/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/stevedore/named.py� <setcomp>R � z1NamedExtensionManager.__init__.<locals>.<setcomp>zCould not load %sz, )�_init_attributesZ _load_plugins�set�_missing_names�LOG�warning�join� _init_plugins) �self� namespace�names�invoke_on_load�invoke_args�invoke_kwdsr r r Zon_missing_entrypoints_callback�verify_requirementsZwarn_on_missing_entrypoint� extensionsr r r �__init__C s&