ok

Mini Shell

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

B

��Y�@s�ddlmZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
mZdZe�d�Zd	d
�Ze�ZGdd�de�ZdS)
�)�absolute_importN)�PY2�	text_type)�
InvalidDsn)�	to_string)�	parse_qsl�urlparsez(Unsupported Sentry DSN scheme: {0} ({1})ZravencCsVddlm}ddlm}dtjkr:dtjkr:t�d�|SdtjkrRt�d�|S|S)	Nr)�ThreadedHTTPTransport)�
HTTPTransportZCURRENT_VERSION_IDZINSTANCE_IDzODetected environment to be Google App Engine. Using synchronous HTTP transport.ZLAMBDA_TASK_ROOTzHDetected environment to be AWS Lambda. Using synchronous HTTP transport.)Zraven.transport.threadedr	Zraven.transport.httpr
�os�environ�logger�info)r	r
�r�B/opt/alt/python37/lib/python3.7/site-packages/raven/conf/remote.py�discover_default_transports


rc@sDeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zeddd
��Z	dS)�RemoteConfigNcCsV|r|�d�}d||f}nd}||_||_||_||_|p>i|_||_|pNt|_dS)N�/z%s/api/%s/store/)	�rstrip�base_url�project�
public_key�
secret_key�options�store_endpoint�DEFAULT_TRANSPORT�_transport_cls)�selfrrrr�	transportrrrrr�__init__(s

zRemoteConfig.__init__cCs
t|j�S)N)rr)rrrr�__unicode__9szRemoteConfig.__unicode__cCst|j|j|j|jg�S)N)�allrrrr)rrrr�	is_active<szRemoteConfig.is_activecCs*|js
dSt|d�s$|jf|j�|_|jS)N�
_transport)r�hasattrrrr#)rrrr�
get_transport?s

zRemoteConfig.get_transportcCs:t|j�}|j}|jr$|d|j7}d|j||j|jfS)Nz:%sz//%s@%s%s/%s)rr�hostname�portr�pathr)r�url�netlocrrr�get_public_dsnGs

zRemoteConfig.get_public_dsncCs&trt|�}t|���}|jdkr,t�d�|dkrz|sPddlm}m	}||�}|�
|j�sntt�
|j|���|�|j�}|j}|jr�|d|j7}|j�dd�}t|�dkr�|d}	nd}	|d	}
t||
|j|jg�s�td
|����d|j�dd�d	||	f}|||
|j|jtt|j��|d
�S)N)ZhttpZhttpsznTransport selection via DSN is deprecated. You should explicitly pass the transport class to Client() instead.r)�TransportRegistry�default_transportsz:%sr�����zInvalid Sentry DSN: %rz	%s://%s%s�+)rrrrrr)rrr�stripZscheme�warnings�warnZraven.transportr,r-Zsupported_schemer�ERR_UNKNOWN_SCHEME�formatZget_transport_clsr&r'r(�rsplit�lenr!ZusernameZpasswordZgeturl�dictrZquery)�cls�valuerZtransport_registryr)r,r-r*Z	path_bitsr(rrrrr�from_stringNs<


zRemoteConfig.from_string)NNNNNN)NN)
�__name__�
__module__�__qualname__rr r"r%r+�classmethodr<rrrrr's
r)Z
__future__rZloggingrr3Zraven.utils.compatrrZraven.exceptionsrZraven.utils.encodingrZraven.utils.urlparserrr5Z	getLoggerr
rr�objectrrrrr�<module>s


Zerion Mini Shell 1.0