def get_exception_reporter_filter(request):
    global default_exception_reporter_filter
    if default_exception_reporter_filter is None:
        # Load the default filter for the first time and cache it.
        modpath = settings.DEFAULT_EXCEPTION_REPORTER_FILTER
        modname, classname = modpath.rsplit('.', 1)
        try:
            mod = import_module(modname)
        except __HOLE__ as e:
            raise ImproperlyConfigured(
            'Error importing default exception reporter filter %s: "%s"' % (modpath, e))
        try:
            default_exception_reporter_filter = getattr(mod, classname)()
        except AttributeError:
            raise ImproperlyConfigured('Default exception reporter filter module "%s" does not define a "%s" class' % (modname, classname))
    if request:
        return getattr(request, 'exception_reporter_filter', default_exception_reporter_filter)
    else:
        return default_exception_reporter_filter
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/views/debug.py/get_exception_reporter_filter