[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.133.81.218: ~ $
U

��\�!�@s�ddlZddlZddlZddlmZddlmZmZddlmZm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZmZddlmZddlmZed	�Zd
d�ZGdd
�d
e�Z dS)�N)�datetime)�string_types�	text_type)�strip_event_mut�flatten_metadata�
convert_types�
handle_in_app�
get_type_name�capture_internal_exceptions�current_stacktrace�logger)�make_transport)�DEFAULT_OPTIONS�SDK_INFO)�setup_integrations)�
ContextVarZclient_init_debugcOs�|r4t|dt�s|ddkr4|d}|dd�}nd}tt�}t||�}|dk	rh|�d�dkrh||d<|��D]&\}}||kr�td|f��|||<qp|ddkr�tj�d�|d<|ddkr�tj�d�|d<|ddkr�tj�d	�|d<|S)
Nr��dsnzUnknown option %rZ
SENTRY_DSN�releaseZSENTRY_RELEASE�environmentZSENTRY_ENVIRONMENT)	�
isinstancer�dictr�get�items�	TypeError�os�environ)�args�kwargsr�rv�options�key�value�r#�
/client.py�get_options!s&

r%c@sleZdZdZdd�Zedd��Zdd�Zdd	�Zddd�Z	dd
d�Z
ddd�Zddd�Zdd�Z
dd�Zd
S)�Clientz�The client is internally responsible for capturing the events and
    forwarding them to sentry through the configured transport.  It takes
    the client options as keyword arguments and optionally the DSN as first
    argument.
    c	Os|t�d�}z`t||�|_}t�|d�t|�|_d}|d|krRtd�|���t	|d|dd�|_
W5t�|�XdS)	NF�debug)�always�neverZsmallZmedium�request_bodiesz3Invalid value for request_bodies. Must be one of {}�integrationsZdefault_integrations)Z
with_defaults)�_client_init_debugr�setr%r r
�	transport�
ValueError�formatrr+)�selfrrZ	old_debugr r*r#r#r$�__init__Fs"

���zClient.__init__cCs
|jdS)z%Returns the configured DSN as string.r)r �r1r#r#r$r\sz
Client.dsnc	Cs�|�d�dkrt��|d<|dk	r:|�||�}|dkr:dS|jdr�d|kr�d|kr�d|kr�t��"t|jd�ddd	�g|d<W5QRXd
D]6}|�|�dkr�|j|dk	r�t|j|���||<q�|�d�dkr�t	t
�}t|j�
��|d<||d<|�d
�dk�rd|d
<t||jd|jd�}|dk	�rHt|�}t|�t|�}|jd}|dk	�r�d}t��|||�}W5QRX|dk�r�t�d|�|}|S)NZ	timestampZattach_stacktraceZ	exception�
stacktraceZthreadsZwith_localsFT)r4ZcrashedZcurrent)rrZserver_nameZdistZsdkr+�platform�pythonZin_app_excludeZin_app_include�before_sendzbefore send dropped event (%s))rrZutcnowZapply_to_eventr r
rr�striprr�sortedr+�keysrrrrr�info)r1�event�hint�scoper!Zsdk_infor7Z	new_eventr#r#r$�_prepare_eventas^�������



zClient._prepare_eventcCs~|�d�}|dkrdSt|d�}d|dj|f}|jdD]:}t|t�rd||ks\||krxdSq>t|d|�r>dSq>dS)N�exc_infoFrz%s.%s�
ignore_errorsT)rr	�
__module__r rr�
issubclass)r1r<r=r@Z	type_nameZ	full_nameZerrclsr#r#r$�_is_ignored_error�s

zClient._is_ignored_errorNcCsJ|dk	r|jsdS|jddkr6t��|jdkr6dS|�||�rFdSdS)NFZsample_rateg�?T)�_should_capturer �randomrD)r1r<r=r>r#r#r$rE�s��zClient._should_capturecCsz|jdkrdS|dkri}|�d�}|dkr>t��j|d<}|�|||�sPdS|�|||�}|dkrjdS|j�|�|S)a�Captures an event.

        This takes the ready made event and an optoinal hint and scope.  The
        hint is internally used to further customize the representation of the
        error.  When provided it's a dictionary of optional information such
        as exception info.

        If the transport is not set nothing happens, otherwise the return
        value of this function will be the ID of the captured event.
        NZevent_id)r.r�uuidZuuid4�hexrEr?�
capture_event)r1r<r=r>rr#r#r$rI�s

zClient.capture_eventcCs,|jdk	r(|j||d�|j��d|_dS)z|
        Close the client and shut down the transport. Arguments have the same
        semantics as `self.flush()`.
        N��timeout�callback)r.�flush�kill�r1rKrLr#r#r$�close�s

zClient.closecCs0|jdk	r,|dkr|jd}|jj||d�dS)a{
        Wait `timeout` seconds for the current events to be sent. If no
        `timeout` is provided, the `shutdown_timeout` option value is used.

        The `callback` is invoked with two arguments: the number of pending
        events and the configured timeout.  For instance the default atexit
        integration will use this to render out a message on stderr.
        NZshutdown_timeoutrJ)r.r rMrOr#r#r$rM�s	

zClient.flushcCs|S�Nr#r3r#r#r$�	__enter__�szClient.__enter__cCs|��dSrQ)rP)r1�exc_type�	exc_value�tbr#r#r$�__exit__szClient.__exit__)N)NN)NN)NN)�__name__rB�__qualname__�__doc__r2�propertyrr?rDrErIrPrMrRrVr#r#r#r$r&?s
?�




r&)!rrGrFrZsentry_sdk._compatrrZsentry_sdk.utilsrrrrr	r
rrZsentry_sdk.transportr
Zsentry_sdk.constsrrZsentry_sdk.integrationsrrZ
ClientOptionsZScopeZAnyZDictZOptionalr,r%�objectr&r#r#r#r$�<module>s(



Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 1.43 KB 0644
__init__.cpython-38.pyc File 1.43 KB 0644
_compat.cpython-38.opt-1.pyc File 2.43 KB 0644
_compat.cpython-38.pyc File 2.46 KB 0644
api.cpython-38.opt-1.pyc File 2.83 KB 0644
api.cpython-38.pyc File 2.83 KB 0644
client.cpython-38.opt-1.pyc File 6.07 KB 0644
client.cpython-38.pyc File 6.07 KB 0644
consts.cpython-38.opt-1.pyc File 912 B 0644
consts.cpython-38.pyc File 912 B 0644
debug.cpython-38.opt-1.pyc File 1.52 KB 0644
debug.cpython-38.pyc File 1.52 KB 0644
hub.cpython-38.opt-1.pyc File 11.45 KB 0644
hub.cpython-38.pyc File 11.53 KB 0644
scope.cpython-38.opt-1.pyc File 6.3 KB 0644
scope.cpython-38.pyc File 6.3 KB 0644
transport.cpython-38.opt-1.pyc File 5.6 KB 0644
transport.cpython-38.pyc File 5.6 KB 0644
utils.cpython-38.opt-1.pyc File 20.28 KB 0644
utils.cpython-38.pyc File 20.39 KB 0644
worker.cpython-38.opt-1.pyc File 3.17 KB 0644
worker.cpython-38.pyc File 3.17 KB 0644