[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.144.104.123: ~ $


��\�@s�ddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
gZdd�Zdd	�Z
d
d�ZGdd
�d
e�ZdS)�)�copy)�deque)�wraps)�chain)�logger�capture_internal_exceptions�object_to_jsoncCstj|�dS)N)�global_event_processors�append)�	processor�r�	/scope.py�add_global_event_processorsrcCstd|d|j�S)N�fset�doc)�property�__doc__)�fnrrr
�_attr_settersrcs"t���fdd��}|S)Ncs;|js
dSzd|_�|||�SWdd|_XdS)NFT)�_should_capture)�self�args�kwargs)rrr
�wrappers		z!_disable_capture.<locals>.wrapper)r)rrr)rr
�_disable_capturesrc@seZdZdZd3Zdd�Zedd��Zedd��Zedd��Z	edd��Z
dd�Zdd�Zdd�Z
dd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+d,�Zed*d-d.��Zd/d0�Zd1d2�Zd*S)4�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_processorsrcCs)g|_g|_d|_|j�dS)N)r%r&r�clear)rrrr
�__init__@s			zScope.__init__cCs
||_dS)z"When set this overrides the level.N)r)r�valuerrr
�levelGszScope.levelcCs
||_dS)z0When set this overrides the default fingerprint.N)r)rr)rrr
�fingerprintLszScope.fingerprintcCs
||_dS)z;When set this forces a specific transaction name to be set.N)r)rr)rrr
�transactionQszScope.transactioncCs
||_dS)z/When set a specific user is bound to the scope.N)r )rr)rrr
�userVsz
Scope.usercCs||j|<dS)z)Sets a tag for a key to a specific value.N)r!)r�keyr)rrr
�set_tag[sz
Scope.set_tagcCs|jj|d�dS)zRemoves a specific tag.N)r!�pop)rr.rrr
�
remove_tag_szScope.remove_tagcCs||j|<dS)z5Binds a context at a certain key to a specific value.N)r")rr.r)rrr
�set_contextcszScope.set_contextcCs|jj|d�dS)zRemoves a context.N)r"r0)rr.rrr
�remove_contextgszScope.remove_contextcCs||j|<dS)z&Sets an extra key to a specific value.N)r#)rr.r)rrr
�	set_extrakszScope.set_extracCs|jj|d�dS)zRemoves a specific extra key.N)r#r0)rr.rrr
�remove_extraoszScope.remove_extracCsVd|_d|_d|_d|_i|_i|_i|_|j�d|_dS)zClears the entire scope.NT)	rrrr r!r"r#�clear_breadcrumbsr)rrrr
r'ss							
zScope.clearcCst�|_dS)zClears breadcrumb buffer.N)rr$)rrrr
r6�szScope.clear_breadcrumbscCs|jj|�dS)zq"Register a scope local event processor on the scope.

        This function behaves like `before_send.`
        N)r%r
)r�funcrrr
�add_event_processor�szScope.add_event_processorNcs;�dk	r'|���fdd�}|jj|�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.
        NcsIyt|d��}Wntk
r1d}YnX|rE�||�S|S)N�F)�
isinstance�	Exception)�event�exc_infoZis_inst)�cls�	real_funcrr
r7�s

z'Scope.add_error_processor.<locals>.func)r&r
)rr7r>r)r>r?r
�add_error_processor�s	zScope.add_error_processorcCs'dd�}|jdk	r(|j|d<|jdg�j|j�|jd�dkru|jdk	ru|j|d<|jd�dkr�|jdk	r�|j|d<|jd�dkr�|jdk	r�|j|d<|jr|jd	i�j	t
|j��|jr'|jd
i�j	|j�|jrL|jdi�j	|j�|dk	rg|jd�nd}|dk	r�xB|j
D]7}|||�}|dkr�|||d
�S|}q�Wxbtt|j�D]N}|}t��|||�}WdQRX|dkr|||d�S|}q�W|S)zBApplies the information contained on the scope to the given event.cSstjd|||�dS)Nz%s (%s) dropped event (%s))r�info)r<�causeZtyrrr
�_drop�sz#Scope.apply_to_event.<locals>._dropNr*Zbreadcrumbsr-r,r+�extraZtagsZcontextsr=zerror processorzevent processor)r�
setdefault�extendr$�getr rrr#�updaterr!r"r&rr	r%r)rr<ZhintrCr=rZ	new_eventrrr
�apply_to_event�s>
$
$
$
	"		!


zScope.apply_to_eventcCs�tj|j�}|j|_|j|_|j|_|j|_|j|_t|j	�|_	t|j
�|_
t|j�|_t|j
�|_
t|j�|_t|j�|_|j|_|S)N)�object�__new__�	__class__rrrrr �dictr!r"r#rr$�listr%r&r)r�rvrrr
�__copy__�szScope.__copy__cCs&d|jjtt|��|jfS)Nz<%s id=%s name=%s>)rL�__name__�hex�idr)rrrr
�__repr__�s	zScope.__repr__)rrrrr r!r"r#r$r%r&r)rQ�
__module__�__qualname__r�	__slots__r(rr*r+r,r-r/r1r2r3r4r5r'r6r8r@rrIrPrTrrrr
r,s@1rN)r�collectionsr�	functoolsr�	itertoolsrZsentry_sdk.utilsrrrr	rrrrJrr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