AlkantarClanX12

Your IP : 18.225.56.79


Current Path : /proc/self/root/opt/alt/python38/lib/python3.8/site-packages/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python38/lib/python3.8/site-packages/__pycache__/NCSentry.cpython-38.pyc

U

<�-c��@s*ddlZddlZddlZGdd�d�ZdS)�Nc@s&eZdZdZdZddd�Zdd�ZdS)	�NCSentrya
    Simple Wrapper

        sentry = NCSentry()

    After successfully inited class we can use Sentry debug system:

    Report to Sentry:

        SentryClient.capture_message("test")
        SentryClient.capture_exception(Exception("MyAwsomeString"))

    z0.19.2Nc	Cs�i|_|r|}ntj�tj�t��}tj�|d�|_|��t	|j��4}|�
�|_tj
|jf|j�|_tj|_tj|_W5QRXdS)Nz.sentry.conf)�sentry_args�os�path�dirname�realpath�__file__�joinZ	conf_path�construct_args�open�readZdsn�
sentry_sdkZinitZclientZcapture_messageZcapture_exception)�self�
config_dirZdir_path�fh�r�9/opt/alt/python38/lib/python3.8/site-packages/NCSentry.py�__init__s
zNCSentry.__init__c
Cspz8ddl}|jjj�|j�}|�d�j|kr6d|jd<Wn2t	k
rj}zt
�d|���W5d}~XYnXdS)Nrz
sentry-sdkZtraces_sample_ratez Can't setup sentry default args )�
pkg_resourcesZexternZ	packaging�versionZVersion�!_NCSentry__conflict_under_versionZget_distributionZparsed_versionr�	Exception�warnings�warn)rrZ_conflict_under_version�errrrrr
*s
�
��zNCSentry.construct_args)N)�__name__�
__module__�__qualname__�__doc__rrr
rrrrrs
r)rr
rrrrrr�<module>s