[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.138.120.251: ~ $
U

��\�@stddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
gZdd�Zdd	�Zd
d�ZGdd
�d
e�ZdS)�)�copy)�deque��wraps)�chain)�logger�capture_internal_exceptions�object_to_jsoncCst�|�dS�N)�global_event_processors�append)�	processor�r�	/scope.py�add_global_event_processorsrcCst||jd�S)N)�fset�doc)�property�__doc__��fnrrr�_attr_settersrcst���fdd��}|S)Ncs2|js
dSzd|_�|f|�|�W�Sd|_XdS)NTF)�_should_capture)�self�args�kwargsrrr�wrappersz!_disable_capture.<locals>.wrapperr)rrrrr�_disable_captures
rc@s�eZdZdZdZdd�Zedd��Zedd��Zed	d
��Z	edd��Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd(d d!�Zed)d"d#��Zd$d%�Zd&d'�ZdS)*�ScopezaThe scope holds extra information that should be sent with all
    events that belong to it.
    )�_level�_name�_fingerprint�_transaction�_user�_tags�	_contexts�_extras�_breadcrumbs�_event_processors�_error_processorsrcCsg|_g|_d|_|��dSr
)r(r)r �clear�rrrr�__init__@szScope.__init__cCs
||_dS)z"When set this overrides the level.N)r�r�valuerrr�levelGszScope.levelcCs
||_dS)z0When set this overrides the default fingerprint.N)r!r-rrr�fingerprintLszScope.fingerprintcCs
||_dS)z;When set this forces a specific transaction name to be set.N)r"r-rrr�transactionQszScope.transactioncCs
||_dS)z/When set a specific user is bound to the scope.N)r#r-rrr�userVsz
Scope.usercCs||j|<dS)z)Sets a tag for a key to a specific value.N)r$�r�keyr.rrr�set_tag[sz
Scope.set_tagcCs|j�|d�dS)zRemoves a specific tag.N)r$�pop�rr4rrr�
remove_tag_szScope.remove_tagcCs||j|<dS)z5Binds a context at a certain key to a specific value.N)r%r3rrr�set_contextcszScope.set_contextcCs|j�|d�dS)zRemoves a context.N)r%r6r7rrr�remove_contextgszScope.remove_contextcCs||j|<dS)z&Sets an extra key to a specific value.N)r&r3rrr�	set_extrakszScope.set_extracCs|j�|d�dS)zRemoves a specific extra key.N)r&r6r7rrr�remove_extraoszScope.remove_extracCs<d|_d|_d|_d|_i|_i|_i|_|��d|_dS)zClears the entire scope.NT)	rr!r"r#r$r%r&�clear_breadcrumbsrr+rrrr*sszScope.clearcCst�|_dS)zClears breadcrumb buffer.N)rr'r+rrrr=�szScope.clear_breadcrumbscCs|j�|�dS)zq"Register a scope local event processor on the scope.

        This function behaves like `before_send.`
        N)r(r)r�funcrrr�add_event_processor�szScope.add_event_processorNcs*�dk	r|���fdd�}|j�|�dS)z�"Register a scope local error processor on the scope.

        The error processor works similar to an event processor but is
        invoked with the original exception info triple as second argument.
        Ncs>zt|d��}Wntk
r*d}YnX|r:�||�S|S)N�F)�
isinstance�	Exception)�event�exc_infoZis_inst��clsZ	real_funcrrr>�s

z'Scope.add_error_processor.<locals>.func)r)r)rr>rFrrEr�add_error_processor�s	zScope.add_error_processorc
Cs�dd�}|jdk	r|j|d<|�dg��|j�|�d�dkrR|jdk	rR|j|d<|�d�dkrt|jdk	rt|j|d<|�d�dkr�|jdk	r�|j|d<|jr�|�d	i��	t
|j��|jr�|�d
i��	|j�|jr�|�di��	|j�|dk	r�|�d�nd}|dk	�r>|j
D].}|||�}|dk�r6|||d
�S|}�qtt|j�D]D}|}t��|||�}W5QRX|dk�r�|||d�S|}�qJ|S)zBApplies the information contained on the scope to the given event.cSst�d|||�dS)Nz%s (%s) dropped event (%s))r�info)rC�causeZtyrrr�_drop�sz#Scope.apply_to_event.<locals>._dropNr/Zbreadcrumbsr2r1r0ZextraZtagsZcontextsrDzerror processorzevent processor)r�
setdefault�extendr'�getr#r"r!r&�updater	r$r%r)rrr(r)rrCZhintrJrDr
Z	new_eventrrr�apply_to_event�s>









zScope.apply_to_eventcCs�t�|j�}|j|_|j|_|j|_|j|_|j|_t|j	�|_	t|j
�|_
t|j�|_t|j
�|_
t|j�|_t|j�|_|j|_|Sr
)�object�__new__�	__class__rr r!r"r#�dictr$r%r&rr'�listr(r)r)r�rvrrr�__copy__�szScope.__copy__cCsd|jjtt|��|jfS)Nz<%s id=%s name=%s>)rR�__name__�hex�idr r+rrr�__repr__�s

�zScope.__repr__)N)N)rW�
__module__�__qualname__r�	__slots__r,rr/r0r1r2r5r8r9r:r;r<r*r=r?rGrrOrVrZrrrrr,s2




1rN)r�collectionsr�	functoolsr�	itertoolsrZsentry_sdk.utilsrrr	ZAny�CallableZDictZOptionalZDequeZListrrrrrPrrrrr�<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