o 2&a@s<ddlZddlmZedZddiZd ddZd d ZdS) N)HierarchicalEmitterz awscli.plugin __builtin__zawscli.handlersTcCsX|r|tt|}|durt}t||D]\}}td||||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. NzInitializing plugin %s: %s) updateBUILTIN_PLUGINS_import_pluginsrzipkeyslogdebugawscli_initialize)plugin_mapping event_hooksinclude_builtinsmodulesnamepluginr//usr/lib/python3/dist-packages/awscli/plugin.py load_pluginss  rcCshg}|D]+\}}td||d|vr|t|q|dd\}}t||gd}||q|S)NzImporting plugin %s: %s.)fromlist)itemsr r append __import__rsplit) plugin_namespluginsrpathpackagemodulerrrr5s r)NT)loggingbotocore.hooksr getLoggerr rrrrrrrs