Ñò ñG“Ic@s¤dZddkZddkZddkZyddklZWn#ej oddklZnXddkZddk l Z l Z l Z e eeƒZeideiƒZeideieiBƒZeidƒZd„Zd „Zd efd „ƒYZd e efd „ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZ defd„ƒYZ!defd„ƒYZ"defd„ƒYZ#d efd!„ƒYZ$d"e$fd#„ƒYZ%d$e$fd%„ƒYZ&d&e$fd'„ƒYZ'd(e$fd)„ƒYZ(d*efd+„ƒYZ)d,e$fd-„ƒYZ*d.e$fd/„ƒYZ+d0efd1„ƒYZ,d2e,fd3„ƒYZ-d4e,fd5„ƒYZ.d6e,fd7„ƒYZ/d8e,fd9„ƒYZ0d:e,fd;„ƒYZ1d<e,fd=„ƒYZ2d>e,fd?„ƒYZ3d@e,fdA„ƒYZ4dBe,fdC„ƒYZ5dDe,fdE„ƒYZ6dFe,fdG„ƒYZ7dHe,fdI„ƒYZ8dJe,fdK„ƒYZ9dLe,fdM„ƒYZ:dNe,fdO„ƒYZ;dPe,fdQ„ƒYZ<dRe,fdS„ƒYZ=dTe,fdU„ƒYZ>dVe,fdW„ƒYZ?dXe,fdY„ƒYZ@dZe,fd[„ƒYZAd\efd]„ƒYZBd^eBfd_„ƒYZCd`eBfda„ƒYZDdbeBfdc„ƒYZEddeBfde„ƒYZFdfeBfdg„ƒYZGdheBfdi„ƒYZHdjeBfdk„ƒYZIdlefdm„ƒYZJyddnkKlLZLWnej on•Xx‡eMeLƒD]yZNeOƒiPeNƒZQeQoZeReQeSƒoJe eQeƒo:eQej o-eQej o eQiTeUeLeNƒfeQ_TqsqsW[N[Q[LdldogZVhZWxŒeOƒiXƒD]{\ZNZYeReYeSeiZfƒoVe eYeƒoFeNi[dpƒ o5eVi\eNƒeUeYdqdƒoeYeWeYi^sscCsV|djodSt|tƒp0t|dƒot|ƒ}qRt|ƒ}n|S(Ntt __unicode__(tNonet isinstancet basestringthasattrtunicodetstr(tvalue((s-/usr/lib/python2.6/site-packages/webob/exc.pyt no_escape[s cCs^|iddƒ}|iddƒ}tid|ƒ}tid|ƒ}tid|ƒ}|S(Ns t s R(treplacetbr_retsubt comment_rettag_re(R ((s-/usr/lib/python2.6/site-packages/webob/exc.pyt strip_tagses t HTTPExceptioncBsReZdZd„Zd„Zd„ZeeƒZepd„Zd„Z nRS(sg Exception used on pre-Python-2.5, where new-style classes cannot be used as an exception. cCs!ti||ƒ||id
${detail} ${html_comment} s${status} ${body}sj ${status}

${status}

${body} cKs°ti|dd|i|ifdd|ti||ƒ|o|ii|ƒn||_||_|dj o||_ t |ƒ|_ n|i o|`|`ndS(Ntstatuss%s %st content_types text/html(RRtcodettitleRtheaderstupdatetdetailtcommentRt body_templateRtbody_template_objt empty_bodyR0tcontent_length(RR5R3R6R7tkw((s-/usr/lib/python2.6/site-packages/webob/exc.pyR°s       cCs h||iƒd6||ipdƒd6||ipdƒd6}|iod||iƒ|dt html_comment( R<R5R6R8R.titemsR3tlowert substitute(RRtescapeR&t body_tmpltktvtt_obj((s-/usr/lib/python2.6/site-packages/webob/exc.pyt _make_bodyÁs"      cCsC|i|tƒ}t|ƒ}|iid|id|id|ƒS(NR/R2tbody(RFR Rtplain_template_objR@R/R2(RRRG((s-/usr/lib/python2.6/site-packages/webob/exc.pyt plain_bodyÕs   cCs.|i|tƒ}|iid|id|ƒS(NR/RG(RFRthtml_template_objR@R/(RRRG((s-/usr/lib/python2.6/site-packages/webob/exc.pyt html_bodyÜscCsê|idj o |`nt|iƒ}|iddƒ}|o d|jp d|jo.|i|ƒ}|ip|idƒq´n+|i|ƒ}|ip|idƒn|idt t |ƒƒfƒ||i |ƒ|gS(Nt HTTP_ACCEPTRthtmls*/*stext/html; charset=utf8stext/plain; charset=utf8sContent-Length( R:Rtlistt headerlisttgetRKR0tappendRIR tlenR/(RRRROtacceptRG((s-/usr/lib/python2.6/site-packages/webob/exc.pytgenerate_responseás !  cCsc|ddjo||i|iƒgS|i o|i o|i||ƒSti|||ƒS(NtREQUEST_METHODtHEAD(R/RORGR9RTRR(RRR((s-/usr/lib/python2.6/site-packages/webob/exc.pyRòs cCs|S(N((R((s-/usr/lib/python2.6/site-packages/webob/exc.pyRúscCs to|St|i|ƒSdS(N(R-RR5(R((s-/usr/lib/python2.6/site-packages/webob/exc.pyRÿsN(R)R*RR1R2R<RR8RHRJtFalseR9RRFRIRKRTRRR,R(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR.s*             t HTTPErrorcBseZdZRS(sö base class for status codes in the 400's and 500's This is an exception which indicates that an error has occurred, and that any work in progress should not be committed. These are typically results in the 400's and 500's. (R)R*R+(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRXstHTTPRedirectioncBseZdZRS(s base class for 300's status code (redirections) This is an abstract base class for 3xx redirection. It indicates that further action needs to be taken by the user agent in order to fulfill the request. It does not necessarly signal an error condition. (R)R*R+(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRYstHTTPOkcBseZdZdZdZRS(sE Base class for the 200's status code (successful responses) iÈtOK(R)R*R+R1R2(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRZst HTTPCreatedcBseZdZdZRS(iÉtCreated(R)R*R1R2(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR\%st HTTPAcceptedcBseZdZdZdZRS(iÊtAccepteds'The request is accepted for processing.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR^)stHTTPNonAuthoritativeInformationcBseZdZdZRS(iËsNon-Authoritative Information(R)R*R1R2(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR`.st HTTPNoContentcBseZdZdZeZRS(iÌs No Content(R)R*R1R2tTrueR9(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRa2stHTTPResetContentcBseZdZdZeZRS(iÍs Reset Content(R)R*R1R2RbR9(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRc7stHTTPPartialContentcBseZdZdZRS(iÎsPartial Content(R)R*R1R2(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRd<st _HTTPMovecBsDeZdZdZedƒZddddded„Zd„Z RS(sþ redirections which require a Location field Since a 'Location' header is a required attribute of 301, 302, 303, 305 and 307 (but not 304), this base class provides the mechanics to make this easy. You can provide a location keyword argument to set the location immediately. You may also give ``add_slash=True`` if you want to redirect to the same URL as the request, except with a ``/`` added to the end. Relative URLs in the location will be resolved to absolute. sThe resource has been moved tosw${explanation} ${location}; you should be redirected automatically. ${detail} ${html_comment}c Csitt|ƒid|d|d|d|ƒ|dj o$||_|otdƒ‚q\n||_dS(NR5R3R6R7s@You can only provide one of the arguments location and add_slash(tsuperReRRtlocationt TypeErrort add_slash(RR5R3R6R7RgRi((s-/usr/lib/python2.6/site-packages/webob/exc.pyR\s  cCs–t|ƒ}|ioL|i}|d7}|iidƒo|d|id7}n||_nti|i|iƒ|_tt |ƒi ||ƒS(Nt/t QUERY_STRINGt?( RRitpath_urlRRPRgturlparseturljoinRfReR(RRRtreqturl((s-/usr/lib/python2.6/site-packages/webob/exc.pyRhs     N( R)R*R+R<RR8RRWRR(((s-/usr/lib/python2.6/site-packages/webob/exc.pyReFs   tHTTPMultipleChoicescBseZdZdZRS(i,sMultiple Choices(R)R*R1R2(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRrtstHTTPMovedPermanentlycBseZdZdZRS(i-sMoved Permanently(R)R*R1R2(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRsxst HTTPFoundcBseZdZdZdZRS(i.tFoundsThe resource was found at(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRt|st HTTPSeeOthercBseZdZdZRS(i/s See Other(R)R*R1R2(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRvƒstHTTPNotModifiedcBseZdZdZeZRS(i0s Not Modified(R)R*R1R2RbR9(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRw‡st HTTPUseProxycBseZdZdZdZRS(i1s Use Proxys8The resource must be accessed through a proxy located at(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRxstHTTPTemporaryRedirectcBseZdZdZRS(i3sTemporary Redirect(R)R*R1R2(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRy”stHTTPClientErrorcBs eZdZdZdZdZRS(s8 base class for the 400's, where the client is in error This is an error condition in which the client is presumed to be in-error. This is an expected problem, and thus is not considered a bug. A server-side traceback is not warranted. Unless specialized, this is a '400 Bad Request' is Bad RequestsdThe server could not comply with the request since it is either malformed or otherwise incorrect. (R)R*R+R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRzœstHTTPBadRequestcBseZRS((R)R*(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR{ªstHTTPUnauthorizedcBseZdZdZdZRS(i‘t UnauthorizedsìThis server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. (R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR|­stHTTPPaymentRequiredcBseZdZdZdZRS(i’sPayment Requireds(Access was denied for financial reasons.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR~¶st HTTPForbiddencBseZdZdZdZRS(i“t Forbiddens#Access was denied to this resource.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR»st HTTPNotFoundcBseZdZdZdZRS(i”s Not Founds The resource could not be found.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRÀstHTTPMethodNotAllowedcBs eZdZdZedƒZRS(i•sMethod Not AllowedsUThe method ${REQUEST_METHOD} is not allowed for this resource.

${detail}(R)R*R1R2RR8(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR‚ÅstHTTPNotAcceptablecBs eZdZdZedƒZRS(i–sNot AcceptablesThe resource could not be generated that was acceptable to your browser (content of type ${HTTP_ACCEPT}.

${detail}(R)R*R1R2Rttemplate(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRƒÍstHTTPProxyAuthenticationRequiredcBseZdZdZdZRS(i—sProxy Authentication Requireds,Authentication with a local proxy is needed.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR…ÖstHTTPRequestTimeoutcBseZdZdZdZRS(i˜sRequest TimeoutsHThe server has waited too long for the request to be sent by the client.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR†Ûst HTTPConflictcBseZdZdZdZRS(i™tConflicts:There was a conflict when trying to complete your request.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR‡ástHTTPGonecBseZdZdZdZRS(ištGonesFThis resource is no longer available. No forwarding address is given.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR‰çstHTTPLengthRequiredcBseZdZdZdZRS(i›sLength RequiredsContent-Length header required.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR‹ístHTTPPreconditionFailedcBseZdZdZdZRS(iœsPrecondition FailedsRequest precondition failed.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRŒòstHTTPRequestEntityTooLargecBseZdZdZdZRS(isRequest Entity Too Larges7The body of your request was too large for this server.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR÷stHTTPRequestURITooLongcBseZdZdZdZRS(ižsRequest-URI Too Longs-The request URI was too long for this server.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRŽüstHTTPUnsupportedMediaTypecBs eZdZdZedƒZRS(iŸsUnsupported Media Types^The request media type ${CONTENT_TYPE} is not supported by this server.

${detail}(R)R*R1R2Rt template_obj(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRstHTTPRequestRangeNotSatisfiablecBseZdZdZdZRS(i sRequest Range Not Satisfiables%The Range requested is not available.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR‘ stHTTPExpectationFailedcBseZdZdZdZRS(i¡sExpectation FailedsExpectation failed.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR’stHTTPUnprocessableEntitycBseZdZdZdZRS(i¦sUnprocessable Entitys,Unable to process the contained instructions(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR“st HTTPLockedcBseZdZdZdZRS(i§tLockedsThe resource is locked(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR”stHTTPFailedDependencycBseZdZdZdZRS(i¨sFailed DependencyssThe method could not be performed because the requested action dependended on another action and that action failed(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR– stHTTPServerErrorcBs eZdZdZdZdZRS(sF base class for the 500's, where the server is in-error This is an error condition in which the server is presumed to be in-error. This is usually unexpected, and thus requires a traceback; ideally, opening a support ticket for the customer. Unless specialized, this is a '500 Internal Server Error' iôsInternal Server ErrorsUThe server has either erred or is incapable of performing the requested operation. (R)R*R+R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR—2stHTTPInternalServerErrorcBseZRS((R)R*(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR˜AstHTTPNotImplementedcBs eZdZdZedƒZRS(iõsNot Implementeds` The request method ${REQUEST_METHOD} is not implemented for this server.

${detail}(R)R*R1R2RR„(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR™DstHTTPBadGatewaycBseZdZdZdZRS(iös Bad Gateways Bad gateway.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRšKstHTTPServiceUnavailablecBseZdZdZdZRS(i÷sService UnavailablesFThe server is currently unavailable. Please try again at a later time.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR›PstHTTPGatewayTimeoutcBseZdZdZdZRS(iøsGateway TimeoutsThe gateway has timed out.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRœVstHTTPVersionNotSupportedcBseZdZdZdZRS(iùsHTTP Version Not Supporteds"The HTTP version is not supported.(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyR[stHTTPInsufficientStoragecBseZdZdZdZRS(iûsInsufficient Storages/There was not enough space to save the resource(R)R*R1R2R<(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRž`stHTTPExceptionMiddlewarecBs eZdZd„Zd„ZRS(s€ Middleware that catches exceptions in the sub-application. This does not catch exceptions in the app_iter; only during the initial calling of the application. This should be put *very close* to applications that might raise these exceptions. This should not be applied globally; letting *expected* exceptions raise through the WSGI stack is dangerous. cCs ||_dS(N(t application(RR ((s-/usr/lib/python2.6/site-packages/webob/exc.pyRpscs[y|i|ˆƒSWn@tj o4}tiƒ‰d‡‡fd†}|||ƒSXdS(Ncs'|djo ˆ}nˆ|||ƒS(N(R(R/R3texc_info(tparent_exc_infoR(s-/usr/lib/python2.6/site-packages/webob/exc.pytrepl_start_responsews  (R RtsysR¡R(RRRtexcR£((RR¢s-/usr/lib/python2.6/site-packages/webob/exc.pyRrs  (R)R*R+RR(((s-/usr/lib/python2.6/site-packages/webob/exc.pyRŸes  (thttpexceptionst status_mapR R1(_R+treRnR¤tstringRt ImportErrortwebob.util.stringtemplatettypestwebobRRRt issubclassRtobjectR-tcompiletSRtIRRR RRR.RXRYRZR\R^R`RaRcRdReRrRsRtRvRwRxRyRzR{R|R~RRR‚RƒR…R†R‡R‰R‹RŒRRŽRR‘R’R“R”R–R—R˜R™RšR›RœRRžRŸtpasteR¦tdirtnametglobalsRPtobjRttypet __bases__R"t__all__R§R>R t ClassTypeR!RQRR1(((s-/usr/lib/python2.6/site-packages/webob/exc.pytIs®      z    .    '  $   )