[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.189.192.107: ~ $


��\�!�@s�ddlZddlZddlZddlmZddlmZmZddlmZm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZmZddlmZddlmZed	�Zd
d�ZGdd
�d
e�ZdS)�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_debugcOsN|rFt|dt�s)|ddkrF|d}|dd�}nd}tt�}t||�}|dk	r�|jd�dkr�||d<xC|j�D]5\}}||kr�td|f��|||<q�W|ddkr�tjjd�|d<|ddkr$tjjd�|d<|ddkrJtjjd	�|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@s�eZdZdZdd�Zedd��Zdd�Zdd	�Zd
dd�Z	d
d
d
d�Z
d
d
dd�Zd
d
dd�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.
    cOs�tjd�}z�t||�|_}tj|d�t|�|_d}|d|krstdj|���t	|d	d
|d�|_
Wdtj|�XdS)
NF�debug�always�never�small�medium�request_bodiesz3Invalid value for request_bodies. Must be one of {}�integrationsZ
with_defaultsZdefault_integrations)r(r)r*r+)�_client_init_debugrr%r �setr
�	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 )r3r#r#r$r\sz
Client.dsncCs-|jd�dkr%tj�|d<|dk	rS|j||�}|dkrSdS|jdr�d|kr�d|kr�d|kr�t��1dt|jd�ddd	d
ig|d<WdQRXxSdD]K}|j|�dkr�|j|dk	r�t|j|�j�||<q�W|jd�dkr[t	t
�}t|jj
��|d<||d<|jd�dkrzd|d<t||jd|jd�}|dk	r�t|�}t|�t|�}|jd}|dk	r)d}t��|||�}WdQRX|dkr#tjd|�|}|S)NZ	timestampZattach_stacktrace�	exceptionZ
stacktrace�threadsZwith_localsZcrashedF�currentTrr�server_name�distZsdkr-�platform�pythonZin_app_excludeZin_app_include�before_sendzbefore send dropped event (%s))rrr8r9)rrZutcnowZapply_to_eventr r
rr�striprr�sortedr-�keysrrrrr�info)r3�event�hint�scoper!Zsdk_infor<Z	new_eventr#r#r$�_prepare_eventasL


(!




zClient._prepare_eventcCs�|jd�}|dkrdSt|d�}d|dj|f}xZ|jdD]K}t|t�r�||ks�||kr�dSqTt|d|�rTdSqTWdS)N�exc_infoFrz%s.%s�
ignore_errorsT)rr	�
__module__r rr�
issubclass)r3rArBrEZ	type_nameZ	full_nameZerrclsr#r#r$�_is_ignored_error�szClient._is_ignored_errorNcCsd|dk	r|jrdS|jddkrJtj�|jdkrJdS|j||�r`dSdS)NFZsample_rateg�?T)�_should_capturer �randomrI)r3rArBrCr#r#r$rJ�szClient._should_capturecCs�|jdkrdS|dkr%i}|jd�}|dkrWtj�j|d<}|j|||�spdS|j|||�}|dkr�dS|jj|�|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)r0r�uuidZuuid4�hexrJrD�
capture_event)r3rArBrCrr#r#r$rN�szClient.capture_eventcCs?|jdk	r;|jd|d|�|jj�d|_dS)z|
        Close the client and shut down the transport. Arguments have the same
        semantics as `self.flush()`.
        N�timeout�callback)r0�flush�kill)r3rOrPr#r#r$�close�s
zClient.closecCsE|jdk	rA|dkr(|jd}|jjd|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_timeoutrOrP)r0r rQ)r3rOrPr#r#r$rQ�s	
zClient.flushcCs|S)Nr#)r3r#r#r$�	__enter__�szClient.__enter__cCs|j�dS)N)rS)r3�exc_type�	exc_value�tbr#r#r$�__exit__szClient.__exit__)�__name__rG�__qualname__�__doc__r4�propertyrrDrIrJrNrSrQrTrXr#r#r#r$r&?s?
r&)rrLrKrZsentry_sdk._compatrrZsentry_sdk.utilsrrrrr	r
rrZsentry_sdk.transportr
Zsentry_sdk.constsrrZsentry_sdk.integrationsrrr.r%�objectr&r#r#r#r$�<module>s:



Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 1.47 KB 0644
__init__.cpython-35.pyc File 1.47 KB 0644
_compat.cpython-35.opt-1.pyc File 2.54 KB 0644
_compat.cpython-35.pyc File 2.57 KB 0644
api.cpython-35.opt-1.pyc File 2.91 KB 0644
api.cpython-35.pyc File 2.91 KB 0644
client.cpython-35.opt-1.pyc File 6.53 KB 0644
client.cpython-35.pyc File 6.53 KB 0644
consts.cpython-35.opt-1.pyc File 911 B 0644
consts.cpython-35.pyc File 911 B 0644
debug.cpython-35.opt-1.pyc File 1.59 KB 0644
debug.cpython-35.pyc File 1.59 KB 0644
hub.cpython-35.opt-1.pyc File 12.04 KB 0644
hub.cpython-35.pyc File 12.14 KB 0644
scope.cpython-35.opt-1.pyc File 6.78 KB 0644
scope.cpython-35.pyc File 6.78 KB 0644
transport.cpython-35.opt-1.pyc File 5.86 KB 0644
transport.cpython-35.pyc File 5.86 KB 0644
utils.cpython-35.opt-1.pyc File 22.01 KB 0644
utils.cpython-35.pyc File 22.13 KB 0644
worker.cpython-35.opt-1.pyc File 3.34 KB 0644
worker.cpython-35.pyc File 3.34 KB 0644