ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/__pycache__/events.cpython-311.pyc

�

�܋fA����dZddlmZddlZddlZddlmZddlmZm	Z	dZ
Gd�de��Ze
ed	��rd
�Znd�ZGd�d
e��ZGd�de��ZGd�de��ZdS)z�
raven.events
~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.

�)�absolute_importN)�
to_unicode)�get_stack_info�iter_traceback_frames)�	BaseEvent�	Exception�Message�Queryc�&�eZdZd�Zd�Zd�Zd�ZdS)rc�P�||_tjt��|_dS�N)�client�logging�	getLogger�__name__�logger)�selfrs  �C/opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/events.py�__init__zBaseEvent.__init__s������'��1�1�����c��t�r
)�NotImplementedError�r�datas  r�	to_stringzBaseEvent.to_strings��!�!rc��iSr
�)r�kwargss  r�capturezBaseEvent.captures��
�	
rc�6�|j�|��Sr
)r�	transform)r�values  rr!zBaseEvent.transform s���{�$�$�U�+�+�+rN)r�
__module__�__qualname__rrrr!rrrrrsP������2�2�2�"�"�"�
�
�
�,�,�,�,�,rr�__suppress_context__c#�K�|V�|\}}}t��}|�|��	|jr|j}n|j}||vrdS|�|��|�dSt|��||jfV��O)z�
        Return a generator iterator over an exception's chain.

        The exceptions are yielded from outermost to innermost (i.e. last to
        first when viewing a stack trace).

        TN)�set�addr%�	__cause__�__context__�type�
__traceback__)�exc_info�exc_type�exc�
exc_traceback�contexts     r�_chained_exceptionsr2(s���������'/�$��#�}��%�%�����C����	4��'�
&��m����o���g�~�~����K�K������{����s�)�)�S�#�"3�3�3�3�3�	4rc#�K�|V�dSr
r)r-s rr2r2Cs���������rc�*�eZdZdZdZd�Zd�Zdd�ZdS)rz�
    Exceptions store the following metadata:

    - value: 'My exception value'
    - type: 'ClassName'
    - module '__builtin__' (i.e. __builtin__.TypeError)
    - frames: a list of serialized frames (see _get_traceback_frames)

    �	exceptionc�z�||jdd}|dr|d�d|d��S|dS)N�values���r"r+z: ��name)rrr/s   rrzException.to_stringTsF���4�9�o�h�'��+���w�<�	:�"�6�{�{�{�C��L�L�9�9��6�{�rc� �tt|��|j|jj���}t|dd��}|rt
|��}t|dd��}t|��t
|��t|��|d�S)zH
        Convert exception info to a value for the values list.
        )�transformer�capture_localsr#Nrz	<unknown>)r"r+�module�
stacktrace)rrr!rr=�getattr�strr)rr.�	exc_valuer0�
stack_info�
exc_modules      r�
_get_valuezException._get_valueZs���$�!�-�0�0����;�5�
�
�
�
��X�|�T�:�:�
��	)��Z���J��8�Z��=�=�� �	�*�*���M�M� ��,�,�$�	
�
�	
rNc��|r|durtj��}|std���g}t|��D]"}|j|�}|�d|���#d|�dtj��|j	d|iiS)NTzNo exception foundr�levelr7)
�sysr-�
ValueErrorr2rE�insert�getr�ERRORr:)rr-rr7r"s     rrzException.captureps����	&�8�t�+�+��|�~�~�H��	3��1�2�2�2���+�H�5�5�	$�	$�H�#�D�O�X�.�E��M�M�!�U�#�#�#�#�
�V�Z�Z����7�7��I��&�)�
�	
rr
)rr#r$�__doc__r:rrErrrrrrGsW���������D����
�
�
�,
�
�
�
�
�
rrc�$�eZdZdZdZd�Zdd�ZdS)r	z{
    Messages store the following metadata:

    - message: 'My message from %s about %s'
    - params: ('foo', 'bar')
    zsentry.interfaces.Messagec�(�||jdS)N�messager9rs  rrzMessage.to_string�s���D�I��y�)�)rrNc�z�t|��}|j||�|��|d�i}d|vr|p||d<|S)N)rP�params�	formattedrP)rr:r!)rrPrRrSrrs      rrzMessage.capture�sZ���W�%�%���I�"��.�.��0�0�&���
���D� � �'�2�7�D��O��r)rN�rr#r$rMr:rrrrrr	r	�sH��������'�D�*�*�*������rr	c�"�eZdZdZdZd�Zd�ZdS)r
zw
    Messages store the following metadata:

    - query: 'SELECT * FROM table'
    - engine: 'postgesql_psycopg2'
    zsentry.interfaces.Queryc�,�||j}|dS)N�queryr9)rr�sqls   rrzQuery.to_string�s���4�9�o���7�|�rc�N�|jt|��t|��d�iS)N)rW�engine)r:rrA)rrWrZrs    rrz
Query.capture�s/���I�#�E�*�*��f�+�+���
�	
rNrTrrrr
r
�sC��������%�D����
�
�
�
�
rr
)rM�
__future__rrrH�raven.utils.encodingr�raven.utils.stacksrr�__all__�objectr�hasattrrr2r	r
rrr�<module>rasQ����'�&�&�&�&�&�����
�
�
�
�+�+�+�+�+�+�D�D�D�D�D�D�D�D�
8��
,�
,�
,�
,�
,��
,�
,�
,�&�7�9�,�-�-��4�4�4�4�6���8
�8
�8
�8
�8
�	�8
�8
�8
�v�����i����6
�
�
�
�
�I�
�
�
�
�
r

Zerion Mini Shell 1.0