Your IP : 3.144.102.43


Current Path : /opt/alt/python27/lib/python2.7/site-packages/raven/scripts/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/raven/scripts/runner.pyc

�
��Yc@@s�dZddlmZddlmZddlZddlZddlZddlZddlm	Z	ddl
mZmZddl
mZd�Zd	�Zd
�Zd�Zd�ZdS(
s�
raven.scripts.runner
~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
i(tabsolute_import(tprint_functionN(tOptionParser(tClienttget_version(tjsoncC@sbytj|�}Wn2tk
rGtd||f�tjd�nXt|j|j|�dS(Ns2Invalid JSON was used for option %s.  Received: %si(	Rtloadst
ValueErrortprinttsystexittsetattrtvaluestdest(toptiontopt_strtvaluetparser((sE/opt/alt/python27/lib/python2.7/site-packages/raven/scripts/runner.pyt
store_jsons
cC@sttd�rtj�SdS(Nt
getloadavg(thasattrtosRtNone(((sE/opt/alt/python27/lib/python2.7/site-packages/raven/scripts/runner.pytget_loadavg s
cC@s<yddl}Wntk
r$dSX|jtj��dS(Ni(tpwdtImportErrorRtgetpwuidRtgeteuid(R((sE/opt/alt/python27/lib/python2.7/site-packages/raven/scripts/runner.pytget_uid&s

cC@sxtjjd�x4dD],}tjjd|t|j|�f�qWtjjd�|j}|j�s�tjjd�tjd	�n|j�s�tjjd
�tjd	�n|jdidd
6dd6idd6dd6d6�}tjjd�tjj	�|j
ddd|dtjdt
d|jdi�dit�d6t�d6�}tjjd|f�dS( NsClient configuration:
tbase_urltprojectt
public_keyt
secret_keys  %-15s: %s
s
s'Error: DSN configuration is not valid!
is)Error: Client reports as being disabled!
tdatasraven.scripts.runnertculprits
raven.testtloggertGETtmethodshttp://example.comturltrequestsSending a test message... tmessages5This is a test message generated using ``raven test``tleveltstackttagstextratusertloadavgsEvent ID was %r
(RRRR (R	tstdouttwritetgetattrtremotet	is_activeR
t
is_enabledtgettflushtcaptureMessagetloggingtINFOtTrueRR(tclienttoptionstkt
remote_configR!tident((sE/opt/alt/python27/lib/python2.7/site-packages/raven/scripts/runner.pytsend_test_message.s:
*	
		
cC@s{tjd�}|jtj�tdt��}|jddddtdddd	d
d�|jddddtdddd	d
d
�|j�\}}dj	|d	�p�t
jjd�}|s�t
d�t
d�tjd	�nt
d�t
d|�t
�t|ddg�}t||j�tjd�|jj�rgtjjd�tjd	�ntjjd�dS(Ns
sentry.errorstversions--datatactiontcallbackttypetstringtnargsiR
R!s--tagsR+t t
SENTRY_DSNs!Error: No configuration detected!sVYou must either pass a DSN to the command, or set the SENTRY_DSN environment variable.sUsing DSN configuration:t
include_pathstraveniserror!
s	success!
(R8t	getLoggertsetLeveltDEBUGRRt
add_optionRt
parse_argstjoinRtenvironR5RR	R
RR@t__dict__ttimetsleeptstatetdid_failR/R0(trootRtoptstargstdsnR;((sE/opt/alt/python27/lib/python2.7/site-packages/raven/scripts/runner.pytmainXs.%




(t__doc__t
__future__RRR8RR	RStoptparseRRJRRtraven.utils.jsonRRRRR@R[(((sE/opt/alt/python27/lib/python2.7/site-packages/raven/scripts/runner.pyt<module>s					*

?>