ó ÂtÚ_c@sÌddlZddlZddlmZddlmZdZdZdeefZdej fd„ƒYZ d ej fd „ƒYZ d e fd „ƒYZ d e fd„ƒYZde fd„ƒYZdS(iÿÿÿÿN(tsix(tget_close_matchessNote: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.htmlsbTo see help text, you can run: aws help aws help aws help sS %s usage: aws [options] [ ...] [parameters] %st CommandActioncBsDeZdZd„Zdd„Zed„ƒZejd„ƒZRS(sÀCustom action for CLI command arguments Allows the choices for the argument to be mutable. The choices are dynamically retrieved from the keys of the referenced command table cKs2||_tt|ƒj||d|j|dS(Ntchoices(t command_tabletsuperRt__init__R(tselftoption_stringstdestRtkwargs((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR1s cCst||j|ƒdS(N(tsetattrR (Rtparsert namespacetvaluest option_string((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyt__call__7scCst|jjƒƒS(N(tlistRtkeys(R((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR:scCsdS(N((Rtval((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR>sN( t__name__t __module__t__doc__RtNoneRtpropertyRtsetter(((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR*s   t CLIArgParsercBs,eZejZdZd„Zdd„ZRS(ic Cs%|jdk r!||jkr!dg}x|tt|jƒƒdd|j…D]U}g}x0|j|||j!D]}|jd|ƒqqW|jdj|ƒƒqMWt||jddƒ}|rd|g}x|D]} |jd| ƒqØW|j|ƒnt j |d j|ƒƒ‚ndS( s¿ It's probably not a great idea to override a "hidden" method but the default behavior is pretty ugly and there doesn't seem to be any other way to change it. s#Invalid choice, valid choices are: Ns%-40ss | tcutoffgš™™™™™é?s' Invalid choice: %r, maybe you meant: s * %ss ( RRtrangetlentChoicesPerLinetappendtjoinRtextendtargparset ArgumentError( Rtactiontvaluetmsgtitcurrenttchoicetpossibletextratword((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyt _check_valueNs ,  c Cstt|ƒj||ƒ\}}ttjddƒ}|dkrKd}nx¿t|ƒjƒD]«\}}t |t j ƒr˜t |||j |ƒƒq^t |tƒr^g}xF|D]>} t | t j ƒrå|j| j |ƒƒq´|j| ƒq´Wt |||ƒq^q^W||fS(Ntencodingsutf-8(RRtparse_known_argstgetattrtsyststdinRtvarstitemst isinstanceRt binary_typeR tdecodeRR( RtargsR tparsedt remainingtterminal_encodingtargR%tencodedtv((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR/ds!   N( RRR"tRawTextHelpFormattert FormatterRR-RR/(((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyRGs  t MainArgParsercBs/eZejZdd„Zd„Zd„ZRS(c CsQtt|ƒjd|jdtddd|dtd|ƒ|j|||ƒdS(Ntformatter_classtadd_helptconflict_handlertresolvet descriptiontusagetprog(RRARR@tFalsetUSAGEt_build(RRtversion_stringRFtargument_tableRH((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR}s cCs/d}x"t|ƒD]}|d|7}qW|S(Nts* %s (tsorted(RRthelp_strR)((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyt_create_choice_helpˆscCsdx%|D]}||}|j|ƒqW|jdddd|ddƒ|jddtd|ƒdS(Ns --versionR$tversionthelps Display the version of this tooltcommandR(t add_to_parsert add_argumentR(RRRLRMt argument_nametargument((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyRKŽs  N( RRR"R?R@RRRQRK(((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyRAzs  tServiceArgParsercBseZd„Zd„ZRS(c CsHtt|ƒjdtjdtdddtƒ|j|ƒ||_dS(NRBRCRDRERG( RRYRR"R?RIRJRKt _service_name(Rtoperations_tablet service_name((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR›s  cCs|jddtd|ƒdS(Nt operationR$R(RVR(RR[((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyRK¤s(RRRRK(((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyRY™s tArgTableArgParsercBs/eZdZdd„Zd„Zdd„ZRS(s*CLI arg parser based on an argument table.c CsWtt|ƒjd|jdtdtddƒ|dkrCi}n|j||ƒdS(NRBRCRGRDRE(RR^RR@RIRJRRK(RRMR((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR¬s   cCsTx%|D]}||}|j|ƒqW|rP|jddtd|ddƒndS(Nt subcommandR$Rtnargst?(RURVR(RRMRtarg_nameRX((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyRK¹s   cCs^t|ƒdkrA|ddkrAtjƒ}d|_|gfStt|ƒj||ƒSdS(NiiRS(RR"t NamespaceRSRR^R/(RR8R ((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR/Ás "   N(RRRRRRKR/(((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyR^©s (R"R1t awscli.compatRtdifflibRtAWS_CLI_V2_MESSAGEt HELP_BLURBRJtActionRtArgumentParserRRARYR^(((s;/opt/awscli/lib/python2.7/site-packages/awscli/argparser.pyt s   3