ó FRTc@s¾dZddlZddlZddlZddlmZddlmZmZddl m Z defd„ƒYZ defd „ƒYZ d e fd „ƒYZ d e fd „ƒYZde fd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd!„ƒYZd"e fd#„ƒYZd$efd%„ƒYZd&efd'„ƒYZd(efd)„ƒYZd*efd+„ƒYZd,efd-„ƒYZd.efd/„ƒYZ d0efd1„ƒYZ!d2efd3„ƒYZ"d4efd5„ƒYZ#d6efd7„ƒYZ$d8e fd9„ƒYZ%d:e fd;„ƒYZ&d<e&fd=„ƒYZ'd>e&fd?„ƒYZ(d@e)fdA„ƒYZ*dBe)fdC„ƒYZ+dDe)fdE„ƒYZ,dFe)fdG„ƒYZ-dHe)fdI„ƒYZ.dJefdK„ƒYZ/dLe)fdM„ƒYZ0dNe)fdO„ƒYZ1dPe)fdQ„ƒYZ2dRe)fdS„ƒYZ3dS(TsI Exception classes - Subclassing allows you to check for specific errors iÿÿÿÿN(thandler(tjsont StandardError(t ResultSettBotoClientErrorcBs)eZdZd„Zd„Zd„ZRS(s9 General Boto Client error (error accessing AWS) cGs&tt|ƒj||Œ||_dS(N(tsuperRt__init__treason(tselfRtargs((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR)scCs d|jS(NsBotoClientError: %s(R(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyt__repr__-scCs d|jS(NsBotoClientError: %s(R(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyt__str__0s(t__name__t __module__t__doc__RR R (((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR%s  tSDBPersistenceErrorcBseZRS((R R (((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR4stStoragePermissionsErrorcBseZdZRS(sP Permissions error when accessing a bucket or key on a storage service. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR8stS3PermissionsErrorcBseZdZRS(sA Permissions error when accessing a bucket or key on S3. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR?stGSPermissionsErrorcBseZdZRS(sA Permissions error when accessing a bucket or key on GS. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRFstBotoServerErrorcBsSeZdd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( cGsctt|ƒj||||Œ||_||_|p:d|_d|_d|_d|_ d|_ d|_ t |jt ƒr¿y|jjdƒ|_Wq¿tk r»tjjdƒq¿Xn|jr_t|jdƒr^|jjddƒ|_d|jkrC|jjdiƒ}|jddƒ|_|jddƒ|_ q\|jjd dƒ|_ q_y&tj||ƒ}|j|jƒWq_ttjjfk r[y‰tj|jƒ}d|krÑ|d|_nd|kr(d|dkr|dd|_nd|dkr(|dd|_ q(nWq\ttfk rW|j|_ d|_q\Xq_XndS( Ntsutf-8s!Unable to decode body from bytes!titemst RequestIdtErrortCodetMessagetmessage(RRRtstatusRtbodytNonet request_idt error_codet_error_messageRt box_usaget isinstancetbytestdecodetUnicodeDecodeErrortbototlogtdebugthasattrtgetRtXmlHandlerWrappert parseStringt TypeErrortxmltsaxtSAXParseExceptionRtloadst ValueError(RRRRR terrorthtparsed((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRNsL            cCs0|dkr|jS|dkr&|jSt‚dS(Nt error_messagetcode(RRtAttributeError(Rtname((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyt __getattr__‰s   cCs5|dkr||_ntt|ƒj||ƒdS(NR6(RRRt __setattr__(RR9tvalue((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR;s  cCs#d|jj|j|j|jfS(Ns %s: %s %s %s(t __class__R RRR(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR –s cCs#d|jj|j|j|jfS(Ns %s: %s %s %s(R=R RRR(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR šs cCsdS(N((RR9tattrst connection((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyt startElementžscCsd|dkr||_nH|dkr0||_n0|dkrH||_n|dkr`||_ndS(NRt RequestIDRRtBoxUsage(s RequestIds RequestID(RRRR!R(RR9R<R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyt endElement¡s        cCs(d|_d|_d|_d|_dS(N(RRRRR!(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyt_cleanupParsedProperties¬s   N( R R RRR:R;R R R@RCRD(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRMs ;      t ConsoleOutputcBs&eZdd„Zd„Zd„ZRS(cCs1||_d|_d|_d|_d|_dS(N(tparentRt instance_idt timestamptcommenttoutput(RRF((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR´s     cCsdS(N(R(RR9R>R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR@»scCsM|dkr||_n1|dkr9tj|ƒ|_nt|||ƒdS(Nt instanceIdRJ(RGtbase64t b64decodeRJtsetattr(RR9R<R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRC¾s    N(R R RRR@RC(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRE³s  tStorageCreateErrorcBs#eZdZdd„Zd„ZRS(s> Error creating a bucket or key on a storage service. cCs)d|_tt|ƒj|||ƒdS(N(RtbucketRROR(RRRR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRËs cCs8|dkr||_ntt|ƒj|||ƒSdS(Nt BucketName(RPRRORC(RR9R<R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRCÏs  N(R R RRRRC(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyROÇs t S3CreateErrorcBseZdZRS(s/ Error creating a bucket or key on S3. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRRÖst GSCreateErrorcBseZdZRS(s/ Error creating a bucket or key on GS. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRSÝstStorageCopyErrorcBseZdZRS(s3 Error copying a key on a storage service. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRTäst S3CopyErrorcBseZdZRS(s$ Error copying a key on S3. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRUëst GSCopyErrorcBseZdZRS(s$ Error copying a key on GS. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRVòstSQSErrorcBs5eZdZdd„Zd„Zd„Zd„ZRS(s0 General Error on Simple Queue Service. cCs2d|_d|_tt|ƒj|||ƒdS(N(RtdetailttypeRRWR(RRRR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRýs  cCstt|ƒj|||ƒS(N(RRWR@(RR9R>R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR@scCsP|dkr||_n4|dkr0||_ntt|ƒj|||ƒSdS(NtDetailtType(RXRYRRWRC(RR9R<R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRCs     cCs8tt|ƒjƒxdD]}t||dƒqWdS(NRXRY(sdetailstype(RRWRDRNR(Rtp((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRD s N(R R RRRR@RCRD(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRWùs    tSQSDecodeErrorcBs)eZdZd„Zd„Zd„ZRS(s- Error when decoding an SQS message. cCs&tt|ƒj||ƒ||_dS(N(RR]RR(RRR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRscCs d|jS(NsSQSDecodeError: %s(R(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR scCs d|jS(NsSQSDecodeError: %s(R(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR s(R R RRR R (((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR]s  tStorageResponseErrorcBs5eZdZdd„Zd„Zd„Zd„ZRS(s3 Error in response from a storage service. cCs)d|_tt|ƒj|||ƒdS(N(RtresourceRR^R(RRRR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR&s cCstt|ƒj|||ƒS(N(RR^R@(RR9R>R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR@*scCs8|dkr||_ntt|ƒj|||ƒSdS(NtResource(R_RR^RC(RR9R<R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRC.s  cCs8tt|ƒjƒxdD]}t||dƒqWdS(NR_(RR^RDRNR(RR\((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRD5s N(R R RRRR@RCRD(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR^"s    tS3ResponseErrorcBseZdZRS(s$ Error in response from S3. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRa;stGSResponseErrorcBseZdZRS(s$ Error in response from GS. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRbBstEC2ResponseErrorcBs5eZdZdd„Zd„Zd„Zd„ZRS(s% Error in response from EC2. cCsˆd|_g|_tt|ƒj|||ƒg|jD]}|j|jf^q8|_t|jƒr„|jd\|_|_ndS(Ni( Rterrorst_errorResultSetRRcRRR6tlen(RRRRte((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRMs   +cCs3|dkr+tdtfgƒ|_|jSdSdS(NtErrorsR(Rt _EC2ErrorReR(RR9R>R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR@Vs cCs |dkr||_ndSdS(NRA(RR(RR9R<R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRC]s  cCsAtt|ƒjƒg|_xdD]}t||dƒq#WdS(NRd(RRcRDReRNR(RR\((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRDcs  N(R R RRRR@RCRD(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRcIs   tJSONResponseErrorcBseZdZdd„ZRS(sâ This exception expects the fully parsed and decoded JSON response body to be passed as the body parameter. :ivar status: The HTTP status code. :ivar reason: The HTTP reason message. :ivar body: The Python dict that represents the decoded JSON response body. :ivar error_message: The full description of the AWS error encountered. :ivar error_code: A short string that identifies the AWS error (e.g. ConditionalCheckFailedException) cGs€||_||_||_|jr||jjddƒ|_|jjddƒ|_|jr||jjdƒd|_q|ndS(NRt__typet#iÿÿÿÿ(RRRR*RR6Rtsplit(RRRRR ((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRws     N(R R RRR(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRjjs tDynamoDBResponseErrorcBseZRS((R R (((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRn‚stSWFResponseErrorcBseZRS((R R (((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRo†stEmrResponseErrorcBseZdZRS(s$ Error in response from EMR (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRpŠsRicBs&eZdd„Zd„Zd„ZRS(cCs||_d|_d|_dS(N(R?RRR6(RR?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR’s  cCsdS(N(R(RR9R>R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR@—scCs8|dkr||_n|dkr0||_ndSdS(NRR(RR6R(RR9R<R?((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRCšs     N(R R RRR@RC(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRi‘s  tSDBResponseErrorcBseZdZRS(s& Error in responses from SDB. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRq£stAWSConnectionErrorcBseZdZRS(s: General error connecting to Amazon Web Services. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRrªstStorageDataErrorcBseZdZRS(s6 Error receiving data from a storage service. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRs±st S3DataErrorcBseZdZRS(s' Error receiving data from S3. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRt¸st GSDataErrorcBseZdZRS(s' Error receiving data from GS. (R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRu¿stInvalidUriErrorcBseZdZd„ZRS(s%Exception raised when URI is invalid.cCs#tt|ƒj|ƒ||_dS(N(RRvRR(RR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRÉs(R R RR(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRvÆstInvalidAclErrorcBseZdZd„ZRS(s)Exception raised when ACL XML is invalid.cCs#tt|ƒj|ƒ||_dS(N(RRwRR(RR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRÑs(R R RR(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRwÎstInvalidCorsErrorcBseZdZd„ZRS(s*Exception raised when CORS XML is invalid.cCs#tt|ƒj|ƒ||_dS(N(RRxRR(RR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRÙs(R R RR(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRxÖstNoAuthHandlerFoundcBseZdZRS(sAIs raised when no auth handlers were found ready to authenticate.(R R R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRyÞstInvalidLifecycleConfigErrorcBseZdZd„ZRS(sAException raised when GCS lifecycle configuration XML is invalid.cCs#tt|ƒj|ƒ||_dS(N(RRzRR(RR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRæs(R R RR(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRzãstResumableTransferDispositioncBs eZdZdZdZdZRS(t START_OVERtWAIT_BEFORE_RETRYtABORT_CUR_PROCESStABORT(R R R|R}R~R(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR{ìstResumableUploadExceptioncBs eZdZd„Zd„ZRS(s€ Exception raised for various resumable upload problems. self.disposition is of type ResumableTransferDisposition. cCs/tt|ƒj||ƒ||_||_dS(N(RR€RRt disposition(RRR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR s cCsd|j|jfS(Ns"ResumableUploadException("%s", %s)(RR(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR s(R R RRR (((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR€s tResumableDownloadExceptioncBs eZdZd„Zd„ZRS(s‚ Exception raised for various resumable download problems. self.disposition is of type ResumableTransferDisposition. cCs/tt|ƒj||ƒ||_||_dS(N(RR‚RRR(RRR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRs cCsd|j|jfS(Ns$ResumableDownloadException("%s", %s)(RR(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR !s(R R RRR (((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR‚s tTooManyRecordsExceptioncBseZdZd„ZRS(sd Exception raised when a search of Route53 records returns more records than requested. cCs#tt|ƒj|ƒ||_dS(N(RRƒRR(RR((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR,s(R R RR(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyRƒ&stPleaseRetryExceptioncBs#eZdZdd„Zd„ZRS(s0 Indicates a request should be retried. cCs||_||_dS(N(Rtresponse(RRR…((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR5s cCsd|j|jfS(NsPleaseRetryException("%s", %s)(RR…(R((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR 9sN(R R RRRR (((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pyR„1s (4RRLtxml.saxR.R&Rt boto.compatRRtboto.resultsetRRRRRRRtobjectRERORRRSRTRURVRWR]R^RaRbRcRjRnRoRpRiRqRrRsRtRut ExceptionRvRwRxRyRzR{R€R‚RƒR„(((s;/opt/freeware/lib/python2.7/site-packages/boto/exception.pytsZ   f!