o
    2&ßaÙ  ã                   @   s<   d dl Z d dlmZ e  d¡ZddiZddd„Zd	d
„ ZdS )é    N)ÚHierarchicalEmitterzawscli.pluginÚ__builtin__zawscli.handlersTc                 C   sX   |r|   t¡ t| ƒ}|du rtƒ }t|  ¡ |ƒD ]\}}t d||¡ | |¡ q|S )a—  

    :type plugin_mapping: dict
    :param plugin_mapping: A dict of plugin name to import path,
        e.g. ``{"plugingName": "package.modulefoo"}``.

    :type event_hooks: ``EventHooks``
    :param event_hooks: Event hook emitter.  If one if not provided,
        an emitter will be created and returned.  Otherwise, the
        passed in ``event_hooks`` will be used to initialize plugins.

    :type include_builtins: bool
    :param include_builtins: If True, the builtin awscli plugins (specified in
        ``BUILTIN_PLUGINS``) will be included in the list of plugins to load.

    :rtype: HierarchicalEmitter
    :return: An event emitter object.

    NzInitializing plugin %s: %s)	ÚupdateÚBUILTIN_PLUGINSÚ_import_pluginsr   ÚzipÚkeysÚlogÚdebugÚawscli_initialize)Úplugin_mappingÚevent_hooksÚinclude_builtinsÚmodulesÚnameÚplugin© r   ú//usr/lib/python3/dist-packages/awscli/plugin.pyÚload_plugins   s   
r   c                 C   sh   g }|   ¡ D ]+\}}t d||¡ d|vr| t|ƒ¡ q| dd¡\}}t||gd�}| |¡ q|S )NzImporting plugin %s: %sÚ.é   )Úfromlist)Úitemsr	   r
   ÚappendÚ
__import__Úrsplit)Úplugin_namesÚpluginsr   ÚpathÚpackageÚmoduler   r   r   r   5   s   r   )NT)ÚloggingÚbotocore.hooksr   Ú	getLoggerr	   r   r   r   r   r   r   r   Ú<module>   s   

