ok

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/raven/transport/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/raven/transport/__pycache__/eventlet.cpython-37.pyc

B

��Y��@s�dZddlmZddlZddlmZyBddlZyddlmZ	Wn e
k
r^ddlmZ	YnXdZ
Wne
k
r~dZ
YnXGd	d
�d
e�ZdS)z�
raven.transport.eventlet
~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
�)�absolute_importN)�
HTTPTransport)�urllib2)�requestTFcs6eZdZddgZd
�fdd�	Zdd�Zdd	�Z�ZS)�EventletHTTPTransportz
eventlet+httpzeventlet+https�dcs"tstd��tt|�jf|�dS)Nz(EventletHTTPTransport requires eventlet.)�has_eventlet�ImportError�superr�__init__)�selfZ	pool_size�kwargs)�	__class__��I/opt/alt/python37/lib/python3.7/site-packages/raven/transport/eventlet.pyrszEventletHTTPTransport.__init__c
Cst|\}}}tj||d�}y4tjdkr6t�||���}nt�|||j���}|Stk
rn}z|Sd}~XYnXdS)N)�headers)��)�eventlet_urllib2ZRequest�sys�version_infoZurlopen�readZtimeout�	Exception)rZpayload�url�datarZreqZresponse�errrrr�
_send_payload"s

z#EventletHTTPTransport._send_payloadcCst�|j|||f�dS)z?
        Spawn an async request to a remote webserver.
        N)�eventletZspawnr)rrrrrrr�send/szEventletHTTPTransport.send)r)�__name__�
__module__�__qualname__Zschemerrr�
__classcell__rr)rrrs
r)�__doc__Z
__future__rrZraven.transport.httprrZeventlet.greenrrr	Zeventlet.green.urllibrrrrrrr�<module>s


Zerion Mini Shell 1.0