ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ Yc@@skdZddlmZyddlmZWnek rCeZnXeZddl Z ddl Z ddl m Z m Z mZddlmZmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lm Z ddl!m"Z"m#Z#ddl$m%Z%e j&Z'e'j(dZ)ddZ+de,fdYZdS(s raven.contrib.flask ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. i(tabsolute_import(t current_userN(trequestt current_apptg(tgot_request_exceptiontrequest_finished(tClientDisconnected(t setup_logging(tClient(tSentry(t SentryHandler(turlparse(t to_unicode(t get_headerst get_environ(tconvert_optionstlogging_configuredc C@sp|t|jdi|d6t|jjdgt|jgBd6|jjdgd6i|d6d6S( NtdefaultstdsntSENTRY_INCLUDE_PATHSt include_pathstRAVEN_IGNORE_EXCEPTIONStignore_exceptionstapptextra(Rtconfigtsettgett import_name(t client_clsRR((sD/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/flask.pyt make_client's R c B@seZdZddededejded Z e dZ e j dZ dZ dZdZdZdZd Zdd Zd Zd Zddddddd ZdZdZdZdZdZRS(s Flask application for Sentry. Look up configuration from ``os.environ['SENTRY_DSN']``:: >>> sentry = Sentry(app) Pass an arbitrary DSN:: >>> sentry = Sentry(app, dsn='http://public:secret@example.com/1') Pass an explicit client:: >>> sentry = Sentry(app, client=client) Automatically configure logging:: >>> sentry = Sentry(app, logging=True, level=logging.ERROR) Capture an exception:: >>> try: >>> 1 / 0 >>> except ZeroDivisionError: >>> sentry.captureException() Capture a message:: >>> sentry.captureMessage('hello, world!') By default, the Flask integration will do the following: - Hook into the `got_request_exception` signal. This can be disabled by passing `register_signal=False`. - Wrap the WSGI application. This can be disabled by passing `wrap_wsgi=False`. - Capture information from Flask-Login (if available). c C@s|r%t|t r%tdn||_||_||_||_||_||_||_ | |_ |r|j |ndS(Ns&client should be an instance of Client( t isinstanceR t TypeErrorRtloggingtlogging_exclusionsRtclienttlevelt wrap_wsgitregister_signaltinit_app( tselfRR$RRR"R#R%R&R'((sD/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/flask.pyt__init__es        cC@s/y tjSWntk rnXt|ddS(Nt_last_event_id(Rtsentry_event_idt ExceptiontgetattrtNone(R)((sD/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/flask.pyt last_event_idws   cC@s.||_y |t_Wntk r)nXdS(N(R+RR,R-(R)tvalue((sD/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/flask.pyR0s    cO@s*|js dS|jd|jddS(Ntexc_info(R$tcaptureExceptionR(R)targstkwargs((sD/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/flask.pythandle_exceptions cC@s i}y|jd}Wntk r3|j}nX|rG||dRtR"tblinkertflaskRRRt flask.signalsRRtwerkzeug.exceptionsRt raven.confRt raven.baseR traven.middlewareR Rxtraven.handlers.loggingR traven.utils.compatR traven.utils.encodingR traven.utils.wsgiRRtraven.utils.confRt Namespacet raven_signalstsignalRR/Rtobject(((sD/opt/alt/python27/lib/python2.7/site-packages/raven/contrib/flask.pyts.