o .&ßaŸã@sRddlZddlZddlmZddlmZddlmZe e ¡Z Gdd„deƒZ dS)éN)Ú BasicCommand)Úsixé)ÚPREDEFINED_SECTION_NAMEScsleZdZdZe ddd¡ZdZe ddd¡Zdddd d d œgZ e j e j f‡fd d „ Z dd„Zdd„Z‡ZS)ÚConfigureGetCommandÚgetÚ configurez_description.rstz2aws configure get varname [--profile profile-name]z _examples.rstÚvarnamez)The name of the config value to retrieve.ÚstoreÚstringT)ÚnameÚ help_textÚactionÚ cli_type_nameÚpositional_argcs tt|ƒ |¡||_||_dS)N)ÚsuperrÚ__init__Ú_streamÚ _error_stream)ÚselfÚsessionÚstreamÚ error_stream©Ú __class__©úE/usr/lib/python3/dist-packages/awscli/customizations/configure/get.pyr%s zConfigureGetCommand.__init__cCs†|j}d|vr|j ¡}| |¡}n| |¡}t d|¡t|tj ƒr2|j   |¡|j   d¡dSt|t ƒrA|j   d|¡dSdS)NÚ.zConfig value retrieved: %sÚ rzBvarname (%s) must reference a value, not a section or sub-section.r)r Ú_sessionÚget_scoped_configrÚ_get_dotted_config_valueÚLOGÚdebugÚ isinstancerÚ string_typesrÚwriteÚdictr)rÚargsÚparsed_globalsr ÚconfigÚvaluerrrÚ _run_main*s$       ÿÿzConfigureGetCommand._run_mainc Cs^| d¡}| d¡}|dkr9|dtvr9|jj}| d¡\}}| |i¡ |¡}|dur7|d |i¡ |¡}|S|ddkrN|d}|d}|dd…} n5|ddks^|d|jjdvrm|d}|d}|dd…} n|j d¡}|duryd}|d}|dd…} |jjd |i¡ |¡}t| ƒdkr­z | | d ¡}W|Sty¬d}Y|Sw|S) NrrrÚprofilesÚprofileééÚdefaultéÿÿÿÿ) ÚsplitÚcountrrÚ full_configrÚget_config_variableÚlenÚAttributeError) rr ÚpartsÚnum_dotsr5ÚsectionÚ config_namer+Ú profile_nameÚ remainingrrrr!FsR  ÿÿ     ÿÿ  þþz,ConfigureGetCommand._get_dotted_config_value)Ú__name__Ú __module__Ú __qualname__ÚNAMErÚ FROM_FILEÚ DESCRIPTIONÚSYNOPSISÚEXAMPLESÚ ARG_TABLEÚsysÚstdoutÚstderrrr,r!Ú __classcell__rrrrrs ÿýÿr) rHÚloggingÚawscli.customizations.commandsrÚ awscli.compatrÚrÚ getLoggerr?r"rrrrrÚs