/usr/lib/python2.6/site-packages/boto
NameSizeModeActions
beanstalk/-0755rm
cacerts/-0755rm
cloudformation/-0755rm
cloudfront/-0755rm
cloudsearch/-0755rm
cloudsearch2/-0755rm
cloudtrail/-0755rm
cognito/-0755rm
contrib/-0755rm
datapipeline/-0755rm
directconnect/-0755rm
dynamodb/-0755rm
dynamodb2/-0755rm
ec2/-0755rm
ecs/-0755rm
elasticache/-0755rm
elastictranscoder/-0755rm
emr/-0755rm
file/-0755rm
fps/-0755rm
glacier/-0755rm
gs/-0755rm
iam/-0755rm
kinesis/-0755rm
logs/-0755rm
manage/-0755rm
mashups/-0755rm
mturk/-0755rm
mws/-0755rm
opsworks/-0755rm
pyami/-0755rm
rds/-0755rm
rds2/-0755rm
redshift/-0755rm
roboto/-0755rm
route53/-0755rm
s3/-0755rm
sdb/-0755rm
services/-0755rm
ses/-0755rm
sns/-0755rm
sqs/-0755rm
sts/-0755rm
support/-0755rm
swf/-0755rm
vendored/-0755rm
vpc/-0755rm
auth.py398540644editdlrm
auth.pyc348910644editdlrm
auth.pyo348910644editdlrm
auth_handler.py20640644editdlrm
auth_handler.pyc17350644editdlrm
auth_handler.pyo17350644editdlrm
compat.py26390644editdlrm
compat.pyc15210644editdlrm
compat.pyo15210644editdlrm
connection.py507910644editdlrm
connection.pyc384300644editdlrm
connection.pyo384300644editdlrm
endpoints.json183840644editdlrm
exception.py171060644editdlrm
exception.pyc226280644editdlrm
exception.pyo226280644editdlrm
handler.py23820644editdlrm
handler.pyc23790644editdlrm
handler.pyo23790644editdlrm
https_connection.py51350644editdlrm
https_connection.pyc50880644editdlrm
https_connection.pyo50880644editdlrm
jsonresponse.py60320644editdlrm
jsonresponse.pyc57330644editdlrm
jsonresponse.pyo57330644editdlrm
plugin.py27110644editdlrm
plugin.pyc23270644editdlrm
plugin.pyo23270644editdlrm
provider.py208900644editdlrm
provider.pyc136860644editdlrm
provider.pyo136860644editdlrm
regioninfo.py62140644editdlrm
regioninfo.pyc56060644editdlrm
regioninfo.pyo56060644editdlrm
requestlog.py14860644editdlrm
requestlog.pyc21850644editdlrm
requestlog.pyo21850644editdlrm
resultset.py65560644editdlrm
resultset.pyc57690644editdlrm
resultset.pyo57690644editdlrm
storage_uri.py391150644editdlrm
storage_uri.pyc352790644editdlrm
storage_uri.pyo352790644editdlrm
utils.py348850644editdlrm
utils.pyc346950644editdlrm
utils.pyo346950644editdlrm
__init__.py363370644editdlrm
__init__.pyc334460644editdlrm
__init__.pyo334460644editdlrm
Edit: /usr/lib/python2.6/site-packages/boto/connection.pyo (38430B)
P5Tc&@sdZddklZddkZddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk l Z ddk lZddk Z ddkZ ddkZ ddkZ ddk lZlZddklZlZlZlZlZddklZdd klZdd klZdd klZdd kl Z dd k!l"Z"e#Z$y:ddk%Z%ddk l&Z&e'e%do e(Z$nWne)j onXyddk*Z*Wne)j oddk+Z*nXe,ddddfDZ-hde(6de#6Z.ei/i0ei/i1ei/i2e i3i4dZ5de6fdYZ7de6fdYZ8de6fdYZ9dei:fdYZ:de6fd YZ;d!e;fd"YZ<dS(#s" Handles basic connections to AWS i(tdatetimeN(tauth(t auth_handler(tconfigt UserAgent(tsixt http_clientturlparsetquotet encodebytes(tAWSConnectionError(tBotoClientError(tBotoServerError(tPleaseRetryException(tProvider(t ResultSet(thttps_connectiontSSLErrorccs"x|]}|tijVqWdS(N(tostenviron(t.0tkey((s3/usr/lib/python2.6/site-packages/boto/connection.pys Ws t USER_IS_ADMINtCURRENT_VERSION_IDtAPPLICATION_IDiiPs cacerts.txttHostConnectionPoolcBsMeZdZdZdZdZdZdZdZdZ RS(s A pool of connections for one remote (host,port,is_secure). When connections are added to the pool, they are put into a pending queue. The _mexe method returns connections to the pool before the response body has been read, so they connections aren't ready to send another request yet. They stay in the pending queue until they are ready for another request, at which point they are returned to the pool of ready connections. The pool of ready connections is an ordered list of (connection,time) pairs, where the time is the time the connection was returned from _mexe. After a certain period of time, connections are considered stale, and discarded rather than being reused. This saves having to wait for the connection to time out if AWS has decided to close it on the other end because of inactivity. Thread Safety: This class is used only from ConnectionPool while it's mutex is held. cCs g|_dS(N(tqueue(tself((s3/usr/lib/python2.6/site-packages/boto/connection.pyt__init__zscCs t|iS(s Returns the number of connections in the pool for this host. Some of the connections may still be in use, and may not be ready to be returned by get(). (tlenR(R((s3/usr/lib/python2.6/site-packages/boto/connection.pytsize}scCs |ii|tifdS(sZ Adds a connection to the pool, along with the time it was added. N(Rtappendttime(Rtconn((s3/usr/lib/python2.6/site-packages/boto/connection.pytputscCsh|ixWtt|iD]@}|iid\}}|i|o|S|i|q WdS(s Returns the next connection in this pool that is ready to be reused. Returns None if there aren't any. iN(tcleantrangeRRtpopt _conn_readyR"tNone(Rt_R!((s3/usr/lib/python2.6/site-packages/boto/connection.pytgets cCs9totSt|dd}|djp |iSdS(sZ There is a nice state diagram at the top of http_client.py. It indicates that once the response headers have been read (which _mexe does before adding the connection to the pool), a response is attached to the connection, and it stays there until it's done reading. This isn't entirely true: even after the client is done reading, the response may be closed, but not removed from the connection yet. This is ugly, reading a private instance variable, but the state we care about isn't available in any public methods. t_HTTPConnection__responseN(t ON_APP_ENGINEtFalsetgetattrR'tisclosed(RR!tresponse((s3/usr/lib/python2.6/site-packages/boto/connection.pyR&s cCsIxBt|idjo+|i|ido|iidqWdS(s/ Get rid of stale connections. iN(RRt _pair_staleR%(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyR#s-cCs)|\}}ti}|ti|jS(s[ Returns true of the (connection,time) pair is too old to be used. (R tConnectionPooltSTALE_DURATION(Rtpairt_connt return_timetnow((s3/usr/lib/python2.6/site-packages/boto/connection.pyR0s  ( t__name__t __module__t__doc__RRR"R)R&R#R0(((s3/usr/lib/python2.6/site-packages/boto/connection.pyR`s      R1cBsYeZdZdZdZdZdZdZdZdZ dZ d Z RS( s A connection pool that expires connections after a fixed period of time. This saves time spent waiting for a connection that AWS has timed out on the other end. This class is thread-safe. g@gN@cCs@h|_d|_ti|_tiddtit_dS(NgtBototconnection_stale_duration( t host_to_pooltlast_clean_timet threadingtLocktmutexRtgetfloatR1R2(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyRs    cCs'ti|i}h|d<|d=|S(NR<R@(tcopyt__dict__(Rt pickled_dict((s3/usr/lib/python2.6/site-packages/boto/connection.pyt __getstate__s cCs|idS(N(R(Rtdct((s3/usr/lib/python2.6/site-packages/boto/connection.pyt __setstate__scCstd|iiDS(s@ Returns the number of connections in the pool. cssx|]}|iVqWdS(N(R(Rtpool((s3/usr/lib/python2.6/site-packages/boto/connection.pys s (tsumR<tvalues(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyRscCs^|i|iiiz9|||f}||ijodS|i|iSWdQXdS(s Gets a connection from the pool for the named host. Returns None if there is no connection that can be reused. It's the caller's responsibility to call close() on the connection when it's no longer needed. N(R#R@t__exit__t __enter__R<R'R)(Rthosttportt is_secureR((s3/usr/lib/python2.6/site-packages/boto/connection.pytget_http_connections  cCsf|iiizK|||f}||ijot|i||ddjo-|idjo|i|_ |i d=n ||_ | |_ dS(syRepresents an HTTP request. :type method: string :param method: The HTTP method name, 'GET', 'POST', 'PUT' etc. :type protocol: string :param protocol: The http protocol used, 'http' or 'https'. :type host: string :param host: Host to which the request is addressed. eg. abc.com :type port: int :param port: port on which the request is being sent. Zero means unset, in which case default port will be chosen. :type path: string :param path: URL path that is being accessed. :type auth_path: string :param path: The part of the URL path used when creating the authentication string. :type params: dict :param params: HTTP url query parameters, with key as name of the param, and value as value of param. :type headers: dict :param headers: HTTP headers, with key as name of the header and value as value of header. :type body: string :param body: Body of the HTTP request. If not present, will be None or empty string (''). sTransfer-EncodingtchunkedtPUTN( tmethodtprotocolRMRNtpathR't auth_pathtparamsRBtheaderstbody( RRXRYRMRNRZR[R\R]R^((s3/usr/lib/python2.6/site-packages/boto/connection.pyR1s $          c Cs8d|i|i|i|i|i|i|i|ifS(NsTmethod:(%s) protocol:(%s) host(%s) port(%s) path(%s) params(%s) headers(%s) body(%s)(RXRYRMRNRZR\R]R^(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyt__str__hscKst|dtpqxZ|iD]O}|i|}t|tio)d}t|id||i|?@[\]^`{|}~sutf-8s User-AgentsContent-LengthsTransfer-EncodingRV(R-R,R]t isinstanceRt text_typeRtencodetsetattrtTrueRt _auth_handlertadd_authRR^(Rt connectiontkwargsRtvaltsafe((s3/usr/lib/python2.6/site-packages/boto/connection.pyt authorizens  ' (R7R8RR_Rl(((s3/usr/lib/python2.6/site-packages/boto/connection.pyRU/s 7 t HTTPResponsecBseZdZddZRS(cOs#tii|||d|_dS(Nt(RRmRt_cached_response(RtargsRi((s3/usr/lib/python2.6/site-packages/boto/connection.pyRscCsO|djo+|iptii||_n|iStii||SdS(s<Read the response. This method does not have the same behavior as http_client.HTTPResponse.read. Instead, if this method is called with no ``amt`` arg, then the response body will be cached. Subsequent calls to ``read()`` with no args **will return the cached response**. N(R'RoRRmtread(Rtamt((s3/usr/lib/python2.6/site-packages/boto/connection.pyRqs  N(R7R8RR'Rq(((s3/usr/lib/python2.6/site-packages/boto/connection.pyRms tAWSAuthConnectioncBseZd d ed d d d d dd ddd eed dZdZdZdZdZe eeZ dZ d Z e e e Z d Ze eZd Ze eZeZeZd Ze eZeZeZd Ze eZddZd dZdZdZdZdZdZd d dZd dZdZdZ dZ!dZ"d d d dZ#d d dd dZ$d dd d d d d d dZ%dZ&RS(!it/tawscCs`||_d|_tiddotidd}n||_tidd||_|iot ot dnti ddt }|djo d}n||_ |o ||_nt||_|i|||| titititif|_g|_to|iitintif|_| dj o$| d|_|i| d 7_n d|_|o d |_ n d |_ ||_!| |_"t#| t$i%p d} nti&dd | |_'d|_(h|_)t*i+dt*i+d fdjo ti&ddd|i)dscCsgS(N((R((s3/usr/lib/python2.6/site-packages/boto/connection.pyRAscCst|idS(Nt service_name(R-Rf(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyt_get_auth_service_nameDscCs||i_dS(N(RfR(Rtvalue((s3/usr/lib/python2.6/site-packages/boto/connection.pyt_set_auth_service_nameJscCst|idS(Nt region_name(R-Rf(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyt_get_auth_region_nameNscCs||i_dS(N(RfR(RR((s3/usr/lib/python2.6/site-packages/boto/connection.pyt_set_auth_region_nameQscCs|i|iS(N(RPR(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyRhUscCs |iiS(N(Rt access_key(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyRYscCs |iiS(N(Rt secret_key(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyR_scCs |iiS(N(RR(R((s3/usr/lib/python2.6/site-packages/boto/connection.pyRescCs&|ip|itidd|S|id}|djo||}|| }nd}|ddjo t}nt}|iid}|i |idg}|D]}|o ||qq~}ddi |}|ddjo|o|d7}n|o||}n|S(Ns^(/*)/s\1t?iiRt( RRZtretsubtfindR'ReR,tsplittextendtjoin(RRZtposR\t need_trailingt path_elementst_[1]tp((s3/usr/lib/python2.6/site-packages/boto/connection.pytget_pathis&    ,cCs|p |i}n|djo |i}n]totid djptid djo|djo |i}nd|i|f}|S( NiPis2.5s2.6s2.7is%s:%d(s2.6s2.7(RNRMR+Rtversion(RRNtsignature_host((s3/usr/lib/python2.6/site-packages/boto/connection.pyt server_names   ! cCs||_||_||_||_dtijo|i o|tid}|itid}|oL|i d|_|i d|_|i d|_|i d|_qSn|ipt i ddd|_n|ipt i dd d|_n|ipt i dd d|_n|ipt i dd d|_n|i o|iod GH|i |_ntiid dptiidd|_|idj |_dS(Nt http_proxysX(?:http://)?(?:(?P[\w\-\.]+):(?P.*)@)?(?P[\w\-\.]+)(?::(?P\d+))?RMRNtusertpassR:RRRRsFhttp_proxy environment variable does not specify a port, using defaulttno_proxyRntNO_PROXY(RRRRRRRtcompiletmatchtgroupRRR'RNR)Rt use_proxy(RRRRRtpatternR((s3/usr/lib/python2.6/site-packages/boto/connection.pyRs4         .cCsA|ii|||}|dj o|S|i|||SdS(N(RRPR'tnew_http_connection(RRMRNROR!((s3/usr/lib/python2.6/site-packages/boto/connection.pyRPs cCs|iptS|idjotS|}|idd}xF|iidD]2}|o%|i|p|i|otSqPWtS(Nt*t:it,(RR,ReRtendswith(RRMthostonlytname((s3/usr/lib/python2.6/site-packages/boto/connection.pyt skip_proxys ' cCs|djo|i}n|iddd}|ii}||d<|io9| o1|i| o |i}t|i |d| \}} } |otii|nt'i(| wIq7n|i)d.jo^d|i)}|d| 7}tii||i*}t|to|i+d }qnq|i)djp|i)d jp| ou|i%d}|d!jo| i,n |i-|i|i|i| |i.d-j o|i.i/||n|St0| \}|_|_}}}|o|id"|7_nd#|ijo%|ii1d#d$\|_|_nd%|d&}||i|i7}tii||i|i|i|d'j} d-}wIWnt2j oD}tiid(||i3|i|i|i} |i4}n|i5j o}xB|i6D]7}t||o!tiid)|i7i8qqWtiid*|i7i8|i3|i|i|i} nXt'i(| | d$7} qIW|i.d-j o|i.i/||d+t9n|ot:|i)|i;|n!|ond,}t<|d-S(/s> mexe - Multi-execute inside a loop, retrying multiple times to handle transient Internet errors by simply trying again. Also handles redirects. This code was inspired by the S3Utils classes posted to the boto-users Google group by Larry Bates. Thanks! s Method: %ssPath: %ssData: %ss Headers: %ssHost: %ssPort: %ss Params: %sR:RiRcsutf-8itmax_retry_delayi<s Token: %sRhts3tanonsFinal headers: %ssResponse headers: %stlocationtHEADRViiiisReceived %d response. sRetrying in %3.1f secondsi,iRRRisRedirecting: %ss://Rys!encountered a retry exception: %ss0encountered unretryable %s exception, re-raisings&encountered %s exception, reconnectingRs-Please report this exception as a Boto Issue!N(iiii(=RRR{RXRZR^R]RMRNR\R'RRRRPRORatbytesRRctmintrandomR)RRRlRR-R,R RR6t start_timetcallableR t getresponset getheaderst getheaderRVR tsleepRRqtdecodeRRQRthandle_request_dataRRR RR/RRRR7ReR RR (RR tsendertoverride_num_retriest retry_handlerR/R^teRtiRht next_sleepRRRtconn_header_valuetschemeR\tquerytfragmentt unretryable((s3/usr/lib/python2.6/site-packages/boto/connection.pyt_mexevs                 $%        Rnc CsF|i|}|dj o|i|}n|djo h}n |i}|djo h}n |i}|io(tiid| o|i|dR/R^trsR((s3/usr/lib/python2.6/site-packages/boto/connection.pytget_lists$    c CsA|p |}n|i||||}|i}tii||p3tiid||i|i|i|n|idjo_||} ti i | |} t |t i o|id}ntii|| | Stiid|i|iftiid||i|i|i|dS(Ns Null body %sisutf-8s%s %ss%s(R1RqRRR{RRIRRRJRKRaRRbRcRLRMRN( RR=R\tclsRZRPR>R/R^tobjR((s3/usr/lib/python2.6/site-packages/boto/connection.pyt get_objects$    c Cs|p |}n|i||||}|i}tii||p3tiid||i|i|i|n|idjo9t }ti i ||} t i i|| |iStiid|i|iftiid||i|i|i|dS(Ns Null body %sis%s %ss%s(R1RqRRR{RRIRRRRJRKRLRMRN( RR=R\RZRPR>R/R^RQR((s3/usr/lib/python2.6/site-packages/boto/connection.pyt get_statuss     N(R7R8R<R RIR'ReRRR8R1RARHRRRURV(((s3/usr/lib/python2.6/site-packages/boto/connection.pyR66s"       *(=R9RRRRRRRR txml.saxRLRBRRRt boto.utilst boto.handlert boto.cacertsRRt boto.compatRRRRR tboto.exceptionR R R R t boto.providerRtboto.resultsetRR,RRRRRet ImportErrorR>tdummy_threadingtallR+RRZRtdirnametabspathtcacertst__file__RtobjectRR1RURmRsR6(((s3/usr/lib/python2.6/site-packages/boto/connection.pyt,sb             (    3jeT