File: errorapp.py

package info (click to toggle)
python-weberror 0.13.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 408 kB
  • ctags: 441
  • sloc: python: 2,774; makefile: 18
file content (16 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
This simple application creates errors
"""

def error_app(environ, start_response):
    environ['errorapp.item'] = 1
    raise_error()

def raise_error():
    if 1 == 1:
        raise Exception('This is an exception')
    else:
        do_stuff()

def make_error_app(global_conf):
    return error_app