Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib/python3.7/site-packages/raven/utils/serializer/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/raven/utils/serializer/__pycache__/manager.cpython-37.pyc

B

��Y{
�@szdZddlmZddlZddlmZddlmZdZe�	d�Z
Gdd	�d	e�ZGd
d�de�Z
e�ZejZefdd
�ZdS)z�
raven.utils.serializer.manager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
�)�absolute_importN)�closing)�	text_type)�register�	transformzsentry.errors.serializerc@s,eZdZeZdd�Zedd��Zdd�ZdS)�SerializationManagercCsg|_i|_dS)N)�_SerializationManager__registryZ"_SerializationManager__serializers)�self�r
�O/opt/alt/python37/lib/python3.7/site-packages/raven/utils/serializer/manager.py�__init__szSerializationManager.__init__ccsx|jD]
}|VqWdS)N)r)r	�
serializerr
r
r�serializerssz SerializationManager.serializerscCs||jkr|j�|�|S)N)r�append)r	r
r
r
rr s
zSerializationManager.registerN)�__name__�
__module__�__qualname__�loggerr�propertyrrr
r
r
rrsrc@s(eZdZeZdd�Zdd�Zdd�ZdS)�
SerializercCs8||_t�|_g|_x|jD]}|j�||��qWdS)N)�manager�set�contextrr)r	rr
r
r
rr)s
zSerializer.__init__cCs|`|`dS)N)rr)r	r
r
r�close0szSerializer.closecKs�|dkrdSt|�}||jkr"dS|j�|�z�x\|jD]R}|�|�r8y|j|f|�Stk
r�}zt�|�t	t
|��Sd}~XYq8Xq8Wyt|�Stk
r�}zt�|�t	t
|��Sd}~XYnXWd|j�|�XdS)zn
        Primary function which handles recursively transforming
        values via their serializers
        Nz<...>)
�idr�addrZcan�	serialize�	Exceptionr�	exceptionr�type�repr�remove)r	�value�kwargs�objidr
�er
r
rr4s(



zSerializer.transformN)rrrrrrrr
r
r
rr&src	Ks&tt|���}|j|f|�SQRXdS)N)rrr)r"rr#r
r
r
rr\sr)�__doc__�
__future__r�logging�
contextlibrZraven.utils.compatr�__all__�	getLoggerr�objectrrrrrr
r
r
r�<module>s
2

Hacked By AnonymousFox1.0, Coded By AnonymousFox