ok

Mini Shell

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

�

�܋f����dZddlmZddlmZddlZddlZddlZddlZddlm	Z	ddl
mZmZddl
mZd�Zd	�Zd
�Zd�Zd�ZdS)
z�
raven.scripts.runner
~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
�)�absolute_import)�print_functionN)�OptionParser)�Client�get_version)�jsonc���	tj|��}n9#t$r,td|�d|����t	jd��YnwxYwt
|j|j|��dS)Nz!Invalid JSON was used for option z
.  Received: �)	r�loads�
ValueError�print�sys�exit�setattr�values�dest)�option�opt_str�value�parsers    �e/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/raven/scripts/runner.py�
store_jsonrs}����
�5�!�!��������
��g�g�g�u�u�U�V�V�V��������������F�M�6�;��.�.�.�.�.s��3A
�A
c�V�ttd��rtj��SdS)N�
getloadavg)�hasattr�osr��r�get_loadavgr s%���r�<� � ���}�����4rc��	ddl}n#t$rYdSwxYw	|�tj����dS#t
$rYdSwxYw)Nr)�pwd�ImportError�getpwuidr�geteuid�KeyError)r!s r�get_uidr&&sx����
�
�
�
�������t�t�������|�|�B�J�L�L�)�)�!�,�,�������t�t����s��
��+A�
A�Ac
���tj�d��dD]<}tj�d|d�dt|j|���d����=tj�d��|j}|���s3tj�d��tjd��|���s3tj�d	��tjd��|�d
ddd
dd�d���}tj�d��tj�	��|�
d|tjd|�di��t��t��d����}tj�d|�d���dS)NzClient configuration:
)�base_url�project�
public_key�
secret_keyz  �15z: �
z'Error: DSN configuration is not valid!
r
z)Error: Client reports as being disabled!
�datazraven.scripts.runnerz
raven.test�GETzhttp://example.com)�method�url)�culprit�logger�requestzSending a test message... z5This is a test message generated using ``raven test``T�tags)�user�loadavg)�messager.�level�stackr5�extraz
Event ID was )r�stdout�write�getattr�remote�	is_activer�
is_enabled�get�flush�captureMessage�logging�INFOr&r)�client�options�k�
remote_configr.�idents      r�send_test_messagerL1s����J���.�/�/�/�
@�K�K���
����A�A�A�A�w�v�}�a�/H�/H�/H�/H�I�J�J�J�J��J���T�����M�M��"�"�$�$���
���C�D�D�D��������������
���E�F�F�F��������;�;�v�)���'�
�
� � ���D��J���1�2�2�2��J�������!�!�G�
��l��
�[�[���
$�
$��I�I�"�}�}�
�
�

"�

�

�E��J����E�E�E�3�4�4�4�4�4rc���tjd��}|�tj��t	t�����}|�ddtddd���|�d	dtddd
���|���\}}d�	|dd���ptj�d��}|s2td
��td��tjd��td��td|��t��t!|dg���}t#||j��t'jd��|j���r3tj�d��tjd��tj�d��dS)Nz
sentry.errors)�versionz--data�callback�stringr
r.)�actionrO�type�nargsrz--tagsr5� �
SENTRY_DSNz!Error: No configuration detected!zVYou must either pass a DSN to the command, or set the SENTRY_DSN environment variable.zUsing DSN configuration:�raven)�
include_paths�zerror!
z	success!
)rE�	getLogger�setLevel�DEBUGrr�
add_optionr�
parse_args�joinr�environrBr
rrrrL�__dict__�time�sleep�state�did_failr<r=)�rootr�opts�args�dsnrGs      r�mainri[s�����_�-�-�D��M�M�'�-� � � ��+�-�-�
0�
0�
0�F�
���h�z�J�
�Q�V��-�-�-�
���h�z�J�
�Q�V��-�-�-��$�$�&�&�L�T�4�

�(�(�4����8�
�
�
<��
���|� <� <�C���
�1�2�2�2�
�f�g�g�g�������	�
$�%�%�%�	�#�s�O�O�O�	�G�G�G�
�C��y�
1�
1�
1�F��f�d�m�,�,�,�	�J�q�M�M�M�
�|�������
����$�$�$��������J���\�"�"�"�"�"r)�__doc__�
__future__rrrErrra�optparserrVrr�raven.utils.jsonrrrr&rLrirrr�<module>rns�����'�&�&�&�&�&�%�%�%�%�%�%�����	�	�	�	�
�
�
�
�����!�!�!�!�!�!�%�%�%�%�%�%�%�%�!�!�!�!�!�!�/�/�/�������'5�'5�'5�T!#�!#�!#�!#�!#r

Zerion Mini Shell 1.0