

def __init__(self, application, global_conf=None, debug=NoDefault, error_email=None, error_log=None, show_exceptions_in_wsgi_errors=NoDefault, from_address=None, smtp_server=None, smtp_username=None, smtp_password=None, smtp_use_tls=False, error_subject_prefix=None, error_message=None, xmlhttp_key=None):
    from paste.util import converters
    self.application = application
    if (global_conf is None):
        global_conf = {
            
        }
    if (debug is NoDefault):
        debug = converters.asbool(global_conf.get('debug'))
    if (show_exceptions_in_wsgi_errors is NoDefault):
        show_exceptions_in_wsgi_errors = converters.asbool(global_conf.get('show_exceptions_in_wsgi_errors'))
    self.debug_mode = converters.asbool(debug)
    if (error_email is None):
        error_email = (global_conf.get('error_email') or global_conf.get('admin_email') or global_conf.get('webmaster_email') or global_conf.get('sysadmin_email'))
    self.error_email = converters.aslist(error_email)
    self.error_log = error_log
    self.show_exceptions_in_wsgi_errors = show_exceptions_in_wsgi_errors
    if (from_address is None):
        from_address = global_conf.get('error_from_address', 'errors@localhost')
    self.from_address = from_address
    if (smtp_server is None):
        smtp_server = global_conf.get('smtp_server', 'localhost')
    self.smtp_server = smtp_server
    self.smtp_username = (smtp_username or global_conf.get('smtp_username'))
    self.smtp_password = (smtp_password or global_conf.get('smtp_password'))
    self.smtp_use_tls = (smtp_use_tls or converters.asbool(global_conf.get('smtp_use_tls')))
    self.error_subject_prefix = (error_subject_prefix or '')
    if (error_message is None):
        error_message = global_conf.get('error_message')
    self.error_message = error_message
    if (xmlhttp_key is None):
        xmlhttp_key = global_conf.get('xmlhttp_key', '_')
    self.xmlhttp_key = xmlhttp_key

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/exceptions/errormiddleware.py ErrorMiddleware.__init__/original