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__/http.cpython-37.pyc

B

��Y�@shdZddlmZddlmZmZddlmZddlm	Z	m
Z
ddlmZddl
mZGdd	�d	e�Zd
S)z�
raven.transport.http
~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
�)�absolute_import)�string_types�urllib2)�defaults)�APIError�RateLimited)�	Transport)�urlopenc@s0eZdZddgZejdejfdd�Zdd�ZdS)	�
HTTPTransportz	sync+httpz
sync+httpsTcCs>t|t�rt|�}t|t�r(tt|��}||_||_||_dS)N)�
isinstancer�int�bool�timeout�
verify_ssl�ca_certs)�selfrrr�r�E/opt/alt/python37/lib/python3.7/site-packages/raven/transport/http.py�__init__s

zHTTPTransport.__init__c
Cs�tj||d�}yt|||j|j|jd�}Wn�tjk
r�}zp|j�d�}|�	�}|dkr�yt
|j�d��}	Wnttfk
r�d}	YnXt
||	��n|r�t||��n�Wdd}~XYnX|S)zH
        Sends a request to a remote webserver using HTTP POST.
        )�headers)�url�datarrrzx-sentry-errori�zretry-afterrN)rZRequestr	rrrZ	HTTPErrorr�getZgetcoder�
ValueError�	TypeErrorrr)
rrrrZreqZresponse�exc�msg�codeZretry_afterrrr�sends*
zHTTPTransport.sendN)	�__name__�
__module__�__qualname__ZschemerZTIMEOUTZ	CA_BUNDLErrrrrrr
s
r
N)�__doc__Z
__future__rZraven.utils.compatrrZ
raven.confrZraven.exceptionsrrZraven.transport.baserZraven.utils.httpr	r
rrrr�<module>s

Zerion Mini Shell 1.0