File "middleware.cpython-37.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python37/lib/python3.7/site-packages/raven/__pycache__/middleware.cpython-37.pyc
File size: 3.35 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

B

Y
@spdZddlmZddlmZddlmZmZddlm	Z	m
Z
mZeddZGdd	d	eZ
Gd
ddeZdS)
z
raven.middleware
~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
)absolute_import)contextmanager)Iteratornext)get_current_urlget_headersget_environc
csy
dVWnttfk
r$Ynttk
rB||YnVtk
r`||Yn8tk
r}z|jdkr||Wdd}~XYnXdS)Nr)
StopIteration
GeneratorExit	Exceptionhandle_exceptionKeyboardInterrupt
SystemExitcode)environclienterA/opt/alt/python37/lib/python3.7/site-packages/raven/middleware.pycommon_exception_handlings




rc@s0eZdZdZddZddZddZdd	Zd
S)ClosingIteratorz[
    An iterator that is implements a ``close`` method as-per
    WSGI recommendation.
    cCs.||_||_t|dd|_t||_d|_dS)NcloseF)sentryrgetattr_closeiteriterableclosed)selfrrrrrr__init__,s

zClosingIterator.__init__cCs|S)Nr)rrrr__iter__3szClosingIterator.__iter__c	CsHy$t|j|jt|jSQRXWntk
rB|YnXdS)N)rrrrrr	r)rrrr__next__6szClosingIterator.__next__c	Csd|jr
dSz0|jdk	r8t|j|j|WdQRXWd|jjj|jjjd|_XdS)NT)	rrrrrrcontextclearZtransaction)rrrrrBs
zClosingIterator.closeN)__name__
__module____qualname____doc__rr r!rrrrrr&s
rc@s4eZdZdZdddZddZddZdd	d
ZdS)
Sentryz
    A WSGI middleware which will attempt to capture any
    uncaught exceptions and send them to Sentry.

    >>> from raven.base import Client
    >>> application = Sentry(application, Client())
    NcCs*||_|dkr ddlm}|}||_dS)Nr)Client)applicationZ
raven.baser)r)rr*rr)rrrrXs
zSentry.__init__c	Cs@|j||t|||||}WdQRXt|||S)N)rZhttp_contextget_http_contextrr*r)rrZstart_responserrrr__call___szSentry.__call__cCs4|dt|dd|dtt|tt|dS)NZREQUEST_METHODT)Zstrip_querystringZQUERY_STRING)methodurlZquery_stringheadersenv)getrdictrr)rrrrrr+gs


zSentry.get_http_contextcCs
|jS)N)rZcaptureException)rrrrrrrszSentry.handle_exception)N)N)r$r%r&r'rr,r+rrrrrr(Os

r(N)r'
__future__r
contextlibrZraven.utils.compatrrZraven.utils.wsgirrrrrobjectr(rrrr<module>s)