golden hour
/opt/alt/python37/lib/python3.7/site-packages/paste/exceptions/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-37.pyc
249 B
Del
OK
collector.cpython-37.pyc
15.15 KB
Del
OK
errormiddleware.cpython-37.pyc
12 KB
Del
OK
reporter.cpython-37.pyc
4.87 KB
Del
OK
Edit: errormiddleware.cpython-37.pyc
B a�NB � @ sR d Z ddlZddlZddlZyddlmZ W n ek rL ddlmZ Y nX ddlmZm Z m Z ddlmZ ddlm Z ddgZG d d � d e�Ze� ZG dd� de�ZG dd � d e�ZG dd� de�ZG dd� de�Zddd�Zd dd�Zdd� Zdd� Zej �d�Zx@eee��D ]0Zee �� � d��rd�!eed� �e_ P �qW [[dS )!z Error handler middleware � N)�StringIO)� formatter� collector�reporter)�wsgilib)�request�ErrorMiddleware�handle_exceptionc @ s e Zd Zdd� ZdS )� _NoDefaultc C s dS )Nz<NoDefault>� )�selfr r �Q/opt/alt/python37/lib/python3.7/site-packages/paste/exceptions/errormiddleware.py�__repr__ s z_NoDefault.__repr__N)�__name__� __module__�__qualname__r r r r r r s r c @ sL e Zd ZdZdeddeddddddddf dd�Zdd� Zdd � Zd d� ZdS )r a� Error handling middleware Usage:: error_catching_wsgi_app = ErrorMiddleware(wsgi_app) Settings: ``debug``: If true, then tracebacks will be shown in the browser. ``error_email``: an email address (or list of addresses) to send exception reports to ``error_log``: a filename to append tracebacks to ``show_exceptions_in_wsgi_errors``: If true, then errors will be printed to ``wsgi.errors`` (frequently a server error log, or stderr). ``from_address``, ``smtp_server``, ``error_subject_prefix``, ``smtp_username``, ``smtp_password``, ``smtp_use_tls``: variables to control the emailed exception reports ``error_message``: When debug mode is off, the error message to show to users. ``xmlhttp_key``: When this key (default ``_``) is in the request GET variables (not POST!), expect that this is an XMLHttpRequest, and the response should be more minimal; it should not be a complete HTML page. Environment Configuration: ``paste.throw_errors``: If this setting in the request environment is true, then this middleware is disabled. This can be useful in a testing situation where you don't want errors to be caught and transformed. ``paste.expected_exceptions``: When this middleware encounters an exception listed in this environment variable and when the ``start_response`` has not yet occurred, the exception will be re-raised instead of being caught. This should generally be set by middleware that may (but probably shouldn't be) installed above this middleware, and wants to get certain exceptions. Exceptions raised after ``start_response`` have been called are always caught since by definition they are no longer expected. NFc C sT ddl m} || _|d kri }|tkr6|�|�d��}|tkrN|�|�d��}|�|�| _|d kr�|�d�p�|�d�p�|�d�p�|�d�}|�|�| _|| _ || _ |d kr�|�d d �}|| _|d kr�|�dd�}|| _| p�|�d �| _ | p�|�d�| _|�p |�|�d��| _|�pd| _| d k�r.|�d�} | | _|d k�rJ|�dd�}|| _d S )Nr )� converters�debug�show_exceptions_in_wsgi_errors�error_emailZadmin_emailZwebmaster_emailZsysadmin_emailZerror_from_addresszerrors@localhost�smtp_server� localhost� smtp_username� smtp_password�smtp_use_tls� � error_message�xmlhttp_key�_)Z paste.utilr �application� NoDefaultZasbool�get� debug_mode�aslistr � error_logr �from_addressr r r r �error_subject_prefixr r )r r �global_confr r r$ r r% r r r r r&