Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/raven/transport/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pyc

�
��Yc@@s�dZddlmZddlmZddlmZddlmZyBddl	m
Z
mZmZm
Z
mZddlmZeZWnek
r�eZnXdeefd	��YZd
S(s�
raven.transport.twisted
~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
i(tabsolute_import(tBytesIO(tAsyncTransport(t
HTTPTransport(tAgenttFileBodyProducertHTTPConnectionPooltResponseNeverReceivedtreadBody(tHeaderstTwistedHTTPTransportcB@s&eZddgZd�Zd�ZRS(stwisted+https
twisted+httpscO@s]tstd��ntt|�j||�ddlm}t|dt|��|_	dS(Ns*TwistedHTTPTransport requires twisted.web.i(treactortpool(
thas_twistedtImportErrortsuperR
t__init__ttwisted.internetRRRt_agent(tselftargstkwargsR((sH/opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pyRs
c	
@s�|jjd|dtt|��dttd�|j�D����}�fd�}��fd�}|j|�j|�dS(NtPOSTtbodyProducertheaderscs@s$|]\}}||gfVqdS(N((t.0tktv((sH/opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pys	<genexpr>-sc@sO|jt�}|r>�g|jjD]}|j^q%�n
�|j�dS(N(tcheckRtvaluetreasons(tfailuretextf(t
failure_cb(sH/opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pyt
on_failure0s)c@sB�jdkr��n%��fd�}t��j|�SdS(s�
            Success only means that the request succeeded, *not* that the
            actual submission was successful.
            i�c@s �t�j�j|��dS(N(t	Exceptiontcodetphrase(tbody(R"tresponse(sH/opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pyt
on_error_body@sN(R%RtaddCallback(R(R)(R"t
success_cb(R(sH/opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pyt
on_success8s

(	RtrequestRRR	tdicttitemsR*t
addErrback(	RturltdataRR+R"tdR#R,((R"R+sH/opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pyt
async_send)s		%	(t__name__t
__module__tschemeRR4(((sH/opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pyR
s	N(t__doc__t
__future__Rtraven.utils.compatRtraven.transport.baseRtraven.transport.httpRttwisted.web.clientRRRRRttwisted.web.http_headersR	tTrueR
RtFalseR
(((sH/opt/alt/python27/lib/python2.7/site-packages/raven/transport/twisted.pyt<module>s(




Hacked By AnonymousFox1.0, Coded By AnonymousFox