| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/stevedore/__pycache__/ |
Upload File : |
�
��Oc� � �. � d dl mZ G d� de� � ZdS )� )�NamedExtensionManagerc �J � � e Zd ZdZddi ddddf� fd� Z d� fd� Zd� Z� xZS ) �HookManagera� Coordinate execution of multiple extensions using a common name.
:param namespace: The namespace for the entry points.
:type namespace: str
:param name: The name of the hooks to load.
:type name: 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 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 verify_requirements: Use setuptools to enforce the
dependencies of the plugin(s) being loaded. Defaults to False.
:type verify_requirements: bool
:type on_missing_entrypoints_callback: function
: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� Nc
�l �� t t | � � � ||g||||||| �� � d S )N)�invoke_on_load�invoke_args�invoke_kwds�on_load_failure_callback�on_missing_entrypoints_callback�verify_requirements�warn_on_missing_entrypoint)�superr �__init__)�self� namespace�namer r r
r r
r r � __class__s ��0/usr/lib/python3/dist-packages/stevedore/hook.pyr zHookManager.__init__2 sS �� � �k�4� � �)�)��
�F�)�#�#�%=�,K� 3�'A� *�
�
�
�
�
� c �z �� t t | � � � ||||�� � |d | _ d S )N)�propagate_map_exceptionsr � )r r �_init_attributes�_name)r r �names�
name_orderr r r s �r r zHookManager._init_attributesG sH �� � �k�4� � �1�1��u�%=�%=� 2� ?� ?� ?� �1�X��
�
�
r c �D � || j k rt |� � �| j S )z�Return the named extensions.
Accessing a HookManager as a dictionary (``em['name']``)
produces a list of the :class:`Extension` instance(s) with the
specified name, in the order they would be invoked by map().
)r �KeyError�
extensions)r r s r �__getitem__zHookManager.__getitem__P s% � � �4�:����4�.�.� ���r )FFN)�__name__�
__module__�__qualname__�__doc__r r r! �
__classcell__)r s @r r r s� �� � � � � �� �D !&�2�2�*.�%*�15� -2�
�
�
�
�
�
�* =B�27�26�� � � � � � � � � � � � r r N)�namedr r r r r �<module>r( sX �� )� (� (� (� (� (�I� I� I� I� I�'� I� I� I� I� Ir