t_c @sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlmZddlZddlZddlZddlmZmZmZmZmZmZmZmZmZmZm Z ddl!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7ddl8m9Z9ej:e;Z<dZ=dZ>d Z?d Z@ejAd ZBe+e*e,e-fZCd gZDiId d6d d6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dFdL6dMdN6dOdP6dQdR6dSdT6dUdV6dUdW6d,dX6d.dY6d6dZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6dQdi6djdk6dldm6dldn6dodp6dadq6drds6dtdu6dvdw6d[dx6dydz6d{d|6d}d~6dcd6dd6dd6dd6dd6dd6dd6dd6dd6d@d6dyd6ZEdZFdZGdjHdeGdeFZIieGd6eId6ZJdddddddddg ZKdZLddjMgeKD]ZNeNeJ^qdZOdeLdZPdeOdePdZQejAdeQdZRdZSdZTdZUdZVdZWdZXeYdZZde[fdYZ\de[fdYZ]de^fdYZ_de_fdYZ`eadZbdZceddZedZfe@dZge@dZhdZidZjdZkddZmeadZndZodZpde^fdYZqde^fdYZrdZsdZtdZudZvdZwddZxddZydZzdZ{dZ|dZ}eYdZ~eYdZdZdZde^fdYZdefdYZde^fdYZde^fdYZde^fdYZde^fdYZde^fdYZde^fdYZdZdZddZdZdZdZdZde^fdYZde^fdYZdS(iN(ttzutc( tjsontquotet zip_longestturlsplitt urlunsplitt OrderedDicttsixturlparsetget_tzinfo_optionstget_md5t MD5_AVAILABLE(t getproxiest proxy_bypass(tInvalidExpressionErrortConfigNotFoundtInvalidDNSNameErrort ClientErrortMetadataRetrievalErrortEndpointConnectionErrortReadTimeoutErrortConnectionClosedErrortConnectTimeoutErrortUnsupportedS3ArnErrort*UnsupportedS3AccesspointConfigurationErrortSSOTokenLoadErrortInvalidRegionErrortInvalidIMDSEndpointErrortUnsupportedOutpostResourceErrort&UnsupportedS3ControlConfigurationErrortUnsupportedS3ControlArnErrortInvalidHostLabelErrortHTTPClientError(tLocationParseErrorishttp://169.254.169.254/shttp://[fe80:ec2::254%eth0]/s-._~s-z0-9][a-z0-9\-]*[a-z0-9]t dualstacksalexa-for-businessta4btalexaforbusinesst mediatailorsapi.mediatailortpricings api.pricingt sagemakers api.sagemakers api-gatewayt apigatewaysapplication-auto-scalingsapplication-autoscalingt appstreamt appstream2s auto-scalingt autoscalingsauto-scaling-planssautoscaling-planss cost-explorertces cloudhsm-v2t cloudhsmv2scloudsearch-domaintcloudsearchdomainscognito-identity-providers cognito-idpsconfig-servicetconfigscost-and-usage-report-servicetcursiot-data-planesdata.iotsiot-jobs-data-planes data.jobs.iotsmediastore-datasdata.mediastores data-pipelinet datapipelines device-farmt devicefarmsiot-1click-devices-servicesdevices.iot1clicksdirect-connectt directconnectsapplication-discovery-servicet discoverysdatabase-migration-servicetdmssdirectory-servicetdssdynamodb-streamstdynamodbstreamsselastic-beanstalktelasticbeanstalktefstelasticfilesystemselastic-load-balancingtelasticloadbalancingtemrtelasticmapreduceselastic-transcodertelastictranscodertelbselastic-load-balancing-v2telbv2tsestemailsmarketplace-entitlement-servicesentitlement.marketplaceselasticsearch-servicetest eventbridgeteventsscloudwatch-eventssiot-datas iot-jobs-datasiot1click-devicessiot-1click-projectssiot1click-projectsskinesis-analyticstkinesisanalyticss kinesis-videot kinesisvideoslex-model-building-services lex-modelsslex-runtime-services lex-runtimescloudwatch-logstlogssmachine-learningtmachinelearningsmarketplace-entitlementsmarketplace-commerce-analyticstmarketplacecommerceanalyticssmarketplace-meteringsmetering.marketplacetmeteringmarketplaces migration-hubtmghs models.lext cloudwatcht monitoringtmturksmturk-requestert opsworkscms opsworks-cmsprojects.iot1clicksresource-groups-tagging-apitresourcegroupstaggingapisroute-53troute53sroute-53-domainstroute53domainss runtime.lexssagemaker-runtimesruntime.sagemakertsimpledbtsdbssecrets-managertsecretsmanagertserverlessapplicationrepositorytserverlessreposservice-catalogtservicecatalogtsfntstatest stepfunctionssstorage-gatewaytstoragegatewaysstreams.dynamodbttaggings(?:[0-9]{1,3}\.){3}[0-9]{1,3}s[0-9A-Fa-f]{1,4}s(?:{hex}:{hex}|{ipv4})thextipv4tls32s(?:%(hex)s:){6}%(ls32)ss::(?:%(hex)s:){5}%(ls32)ss%(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)ss2(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)ss6(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)ss/(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)ss'(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)ss&(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)ss(?:(?:%(hex)s:){0,6}%(hex)s)?::sDABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~s(?:t|t)s (?:%25|%)(?:[s]|%[a-fA-F0-9]{2})+s\[s)?\]t^t$cCs't|tr|S|jdkSdS(s~Ensures a boolean value if a string or boolean is provided For strings, the value for True/False is case insensitive ttrueN(t isinstancetbooltlower(tval((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytensure_booleanscCsIt|doH|jjdtoH|jjddkoH|jdkS(sDetermines if the provided shape is the special header type jsonvalue. :type shape: botocore.shape :param shape: Shape to be inspected for the jsonvalue trait. :return: True if this type is a jsonvalue, False otherwise :rtype: Bool t serializationt jsonvaluetlocationtheadertstring(thasattrRltgettFalset type_name(tshape((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytis_json_value_headers cCsd|jjd|jjd|j}|jdd}|jdd}tjdd|}|S(svReturns the module name for a service This is the value used in both the documentation and client class name tserviceAbbreviationtserviceFullNametAmazonttAWSs\W+(tmetadataRrt service_nametreplacetretsub(t service_modeltname((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytget_service_module_names  cCs|s dSt|S(Nt/(tremove_dot_segments(tpath((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytnormalize_url_pathscCs|s dS|jd}g}xR|D]J}|r&|dkr&|dkr`|rm|jqmqp|j|q&q&W|ddkrd}nd}|ddkr|rd}nd}|dj||S(NRzRt.s..ii(tsplittpoptappendtjoin(turlt input_urlt output_listtxtfirsttlast((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs"    cCsa| s|dkr%td|nx5dddgD]$}||kr5td|q5q5WdS(NRt expressiont[t]t*(R(Rtinvalid((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytvalidate_jmespath_for_sets  cCs|rt|n|jdd}|dt|dkrH|dnd}}|sjtd|n|r||kri|||d7}|j|jntj||dS(NsHMetadata service returned %s response with status code of %s for url: %ss, content body: %s(RRRRRR(RRt reason_to_logRt statementt logger_args((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs  N(RRRRRRt DEFAULT_METADATA_SERVICE_TIMEOUTRRRRRRRRRRRRRsR(((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR0s     %     tInstanceMetadataFetchercBseeZdZddddgZdZd dZd dZdZd Z d Z d Z RS( s*latest/meta-data/iam/security-credentials/t AccessKeyIdtSecretAccessKeytTokent ExpirationcCsy|j}|j|}|j||}|j|rvi|d6|dd6|dd6|dd6|dd 6Sd |krd |krtjd |niSWnL|jk rtjd |jn&tk r}tjd|j nXiS(Nt role_nameRt access_keyRt secret_keyRRRt expiry_timetCodetMessages7Error response received when retrievingcredentials: %s.s\Max number of attempts exceeded (%s) when attempting to retrieve data from metadata service.sBad IMDS request: %s( Rt _get_iam_rolet_get_credentialst_contains_all_credential_fieldsRRRRRR(RRRt credentialsR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytretrieve_iam_role_credentialss*         cCs%|jd|jd|jd|jS(NRRR(Rt _URL_PATHt_needs_retry_for_role_nameR(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs   cCs8|jd|j|d|jd|}tj|jS(NRRR(RRt_needs_retry_for_credentialsRtloadsR(RRRtr((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs     cCsAytj|jtSWn"tk r<|j|dtSXdS(Ns invalid json(RR RRst ValueErrorRR(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyt_is_invalid_json s  cCs|j|p|j|S(N(RR(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRscCs+|j|p*|j|p*|j|S(N(RRR (RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRscCs8x1|jD]&}||kr tjd|tSq WtS(Ns3Retrieved credentials is missing required field: %s(t_REQUIRED_CREDENTIAL_FIELDSRRRsR(RRtfield((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs N( RRRR RRRRR RRR(((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs "     cCsx|D]}t||tra||krP||krPt||||q||||RRRRt RuntimeError(RR=R((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytparse_timestamps  cCsdt|tjr|}n t|}|jdkrN|jdt}n|jt}|S(sConverted the passed in value to a datetime object with tzinfo. This function can be used to normalize all timestamp inputs. This function accepts a number of different types of inputs, but will always return a datetime.datetime object with time zone information. The input param ``value`` can be one of several types: * A datetime object (both naive and aware) * An integer representing the epoch time (can also be a string of the integer, i.e '0', instead of 0). The epoch time is considered to be UTC. * An iso8601 formatted timestamp. This does not need to be a complete timestamp, it can contain just the date portion without the time component. The returned value will be a datetime object that will have tzinfo. If no timezone info was provided in the input value, then UTC is assumed, not local time. R=N(RgR7R@R=RR~Rt astimezone(Rt datetime_obj((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytparse_to_aware_datetimes  cCstjddd}|jd krQ|d kr<t}n|jd|}n|jdd |j|}t|dr|jS|j|j |j ddd d S( swCalculate the timestamp based on the given datetime instance. :type dt: datetime :param dt: A datetime object to be converted into timestamp :type default_timezone: tzinfo :param default_timezone: If it is provided as None, we treat it as tzutc(). But it is only used when dt is a naive datetime. :returns: The timestamp iiR=t total_secondsiii iNi@Bi@B( R7R=RRR~t utcoffsetRqRDt microsecondstsecondstdays(tdttdefault_timezonetepochtd((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytdatetime2timestamps     csZtj}x-tfddD]}|j|q%W|rL|jS|jSdS(sCalculate a sha256 checksum. This method will calculate the sha256 checksum of a file like object. Note that this method will iterate through the entire file contents. The caller is responsible for ensuring the proper starting position of the file and ``seek()``'ing the file back to its starting location if other consumers need to read from the file like object. :param body: Any file like object. The file must be opened in binary mode such that a ``.read()`` call returns bytes. :param as_hex: If True, then the hex digest is returned. If False, then the digest (as binary bytes) is returned. :returns: The sha256 checksum cs jdS(Nii(R((tbody(s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytRzRzN(thashlibtsha256titertupdatet hexdigesttdigest(RNtas_hextchecksumtchunk((RNs9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytcalculate_sha256 s   csg}dtj}x<tfddD]}|j||jq1W|sj|djSxxt|dkrg}xSt|D]E\}}|dk r|j|||jq|j|qW|}qmWt j |dj dS( s\Calculate a tree hash checksum. For more information see: http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html :param body: Any file like object. This has the same constraints as the ``body`` param in calculate_sha256 :rtype: str :returns: The hex version of the calculated tree hash ics jS(N(R((RNtrequired_chunk_size(s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRO5RzRziitasciiiN( RPRQRRRRURTRt _in_pairsRtbinasciithexlifytdecode(RNtchunksRQRXt new_chunksRtsecond((RNRZs9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytcalculate_tree_hash$s "   cCst|}t||S(N(RRR(titerablet shared_iter((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR\Es tCachedPropertycBs eZdZdZdZRS(sA read only property that caches the initially computed value. This descriptor will only call the provided ``fget`` function once. Subsequent access to this property will return the cached value. cCs ||_dS(N(t_fget(Rtfget((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR^scCs:|dkr|S|j|}||j|jj<|SdS(N(RRgt__dict__R(Rtobjtclstcomputed_value((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyt__get__as  (RRRRRm(((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRfVs tArgumentGeneratorcBsJeZdZedZdZddZdZdZdZ RS(sGenerate sample input based on a shape model. This class contains a ``generate_skeleton`` method that will take an input/output shape (created from ``botocore.model``) and generate a sample dictionary corresponding to the input/output shape. The specific values used are place holder values. For strings either an empty string or the member name can be used, for numbers 0 or 0.0 is used. The intended usage of this class is to generate the *shape* of the input structure. This can be useful for operations that have complex input shapes. This allows a user to just fill in the necessary data instead of worrying about the specific structure of the input arguments. Example usage:: s = botocore.session.get_session() ddb = s.get_service_model('dynamodb') arg_gen = ArgumentGenerator() sample_input = arg_gen.generate_skeleton( ddb.operation_model('CreateTable').input_shape) print("Sample input for dynamodb.CreateTable: %s" % sample_input) cCs ||_dS(N(t_use_member_names(Rtuse_member_names((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRscCsg}|j||S(sGenerate a sample input. :type shape: ``botocore.model.Shape`` :param shape: The input shape. :return: The generated skeleton input corresponding to the provided input shape. (t_generate_skeleton(RRutstack((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytgenerate_skeletons RzcCs |j|jz|jdkr2|j||S|jdkrQ|j||S|jdkrp|j||S|jdkr|jr|S|jrtj |jSdS|jdkrdS|jd krd S|jd krt S|jd kr t j d dddddSWd|j XdS(Nt structureRtmapRpRztintegertlongiR6gtbooleant timestampii(RvRw( RRRtt_generate_type_structuret_generate_type_listt_generate_type_mapRotenumtrandomtchoiceRR7R(RRuRrR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRqs.   cCse|j|jdkriSt}x9|jjD](\}}|j||d|||accesspoint|outpost)[/:](?P.+)$sc^(?P[a-zA-Z0-9\-]{1,63})[/:]accesspoint[/:](?P[a-zA-Z0-9\-]{1,63}$)RcCs(||_|dkr$t|_ndS(N(t _arn_parserRR (Rt arn_parser((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs  cCs|jd|jdS(Nsbefore-parameter-build.s3(Rt handle_arn(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRscKs|j|jkrdS|j|}|dkr5dS|ddkr[|j|||n&|ddkr|j|||ndS(Nt resource_typet accesspointtoutpost(Rt_BLACKLISTED_OPERATIONSt"_get_arn_details_from_bucket_paramRt_store_accesspointt_store_outpost(RR tmodelRRt arn_details((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs cCs[d|krWy4|d}|jj|}|j|||SWqWtk rSqWXndS(NR(RRt_add_resource_type_and_nameR R(RR RR"((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs   cCsX|jj|d}|rE|jd|d<|jd|ds   cCs+|dd}|jd|ddp*dS(NR RRRzi(R~(Rt original_pathRHR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRDRscCsA|jjd|}|j}|r=d|kr=|d}n|S(NRt dnsSuffix(Rtconstruct_endpointt_DEFAULT_DNS_SUFFIX(RRtresolvedt dns_suffix((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRG[s     cCs0|jjdi}||d<||jds( R-RrRR.RRsRRRRRtsettall(RRRt feature_parts((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR9us cCs-|jr dS|jjd}|r)|SdS(Ntvirtualtaddressing_style(R9R-Rr(Rtconfigured_addressing_style((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyt_addressing_styles  cCs`|jdkr tjdtS|jdks>|jdk rOtjddStjdtS(NRWs'Using S3 virtual host style addressing.RsUsing S3 path style addressing.sSDefaulting to S3 virtual host style addressing with path style addressing fallback.(RZRRRR.RR(R((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR:s   N(RRR0RNRRRR3R4R5R6R7R8RCRDRGR?RARfR9RZR:(((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR*s&    "     # tS3ControlEndpointSettercBseZdZdZejdZdddddZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(R+s amazonaws.coms^[a-zA-Z0-9\-]{1,63}$cCsd||_||_||_|dkr3i|_n||_||_|dkr`|j|_ndS(N(RR,R-RR.R/R0(RR1RR2RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs        cCs|jd|jdS(Nsbefore-sign.s3-control(RR3(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRscKs|j|rX|j||j|}|j||j|||j|n^|j|r|j||jd}|j |d|j |j }|j ||ndS(Nt outpost_ids s3-outposts( t_use_endpoint_from_arn_detailst-_validate_endpoint_from_arn_details_supportedt _resolve_region_from_arn_detailst&_resolve_signing_name_from_arn_detailst"_resolve_endpoint_from_arn_detailst_add_headers_from_arn_detailst_use_endpoint_from_outpost_idt#_validate_outpost_redirection_validRRAt_construct_outpost_endpointR,t_update_request_netloc(RRRRR\t new_netloc((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR3s    cCs d|jkS(NR"(R(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR]scCs d|jkS(NR\(R(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRcscCs|j|jjdtsg|jdd}||jkrgd||jf}td|qgn|jdd}||jkrtdd|j|fn|jjdrtdd nd |jdkr|j|ndS( NR>R"RspThe use_arn_region configuration is disabled but received arn for "%s" when the client is configured to use "%s"R;RsClient is configured for "%s" partition, but arn provided is for "%s" partition. The client and arn partition must be the same.RRs7S3 control client does not support accelerate endpointsR(( t_validate_no_custom_endpointR-RrRsRR,RR/Rd(RRt arn_regiont error_msgR=((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR^s"  cCs|jrtddndS(NR;sIClient cannot use a custom "endpoint_url" when specifying a resource ARN.(R.R(R((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRhs cCs2|j|jjdr.tddndS(NR<R;sPClient does not support s3 dualstack configuration when an outpost is specified.(RhR-RrR(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRds cCsA|jjdtr:|jdd}|j|||S|jS(NR>R"R(R-RrRsRR?R,(RRRi((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR_s cCs%|jdd}|j|||S(NR"R(RRA(RRt arn_service((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyR`scCs&|j||}|j||dS(N(t _resolve_netloc_from_arn_detailsRf(RRRRg((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRa scCsZt|j}t|j||j|jdf}tjd|j|f||_dS(NRzsUpdating URI from %s to %s(RRRRRRRR(RRRgREtarn_details_endpoint((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRf$s cCs@|jd}d|kr&|j|S|d}|j||S(NR"R(R(RRet_construct_s3_control_endpoint(RRRR"R((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRl2s     cCs|jj|S(N(t_HOST_LABEL_REGEXR(Rtlabel((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyt_is_valid_host_label9scGs6x/|D]'}|j|std|qqWdS(NRp(RqR(RtlabelsRp((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyt_validate_host_labels<s cCsX|j|||dg}|j||j|}|j||g|j|S(Ns s3-control(Rst_add_dualstackRGRt_construct_netloc(RRRRRP((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRnAs  cCs2|j|d||j|g}|j|S(Ns s3-outposts(RsRGRu(RRR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyReLs  cCs dj|S(NR(R(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRuUscCs&|jjdr"|jdndS(NR<R"(R-RrR(RR((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRtXscCsA|jjd|}|j}|r=d|kr=|d}n|S(NRRL(RRMRN(RRRORP((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRG\s     cCs0|jjdi}||d<||jdytt|jrtSWnttjfk r9nXtS(s: Returns whether we should bypass proxies or not. (R RRRR9tsockettgaierrorRs(R((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRfs s ISO-8859-1cCs_|jd}|sdStj|\}}d|krK|djdSd|kr[|SdS(sReturns encodings from given HTTP Header Dict. :param headers: dictionary to extract encoding from. :param default: default encoding if the content-type is text s content-typetcharsets'"RN(RrRtcgit parse_headerR#(Rtdefaultt content_typeR ((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pytget_encoding_from_headers{s  cKsFt|ttfr$t|}n t|}tj|jdS(NR[(Rgtbytest bytearrayt_calculate_md5_from_bytest_calculate_md5_from_filetbase64t b64encodeR_(RNRt binary_md5((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyt calculate_md5s cCst|}|jS(N(R RU(t body_bytestmd5((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs cs\j}t}x-tfddD]}|j|q.Wj||jS(Ncs jdS(Nii(R((tfileobj(s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRORzRz(ttellR RRRStseekRU(Rtstart_positionRRX((Rs9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyRs    cKsV|d}|d}trR|dk rRd|krRt||}||ddR@RCRRMRYRcR\RfRnRRRRRRRRRRRRRRRRR R R RR*R[RwRRRRRRRRRR(((s9/opt/awscli/lib/python2.7/site-packages/botocore/utils.pyt sj                  L|      .     !V    $    -   ! `      >       W{d