summaryrefslogtreecommitdiffhomepage
path: root/test/python/atexit/wsgi.py
blob: a5a9918d744ce1adb7e60a2b8e892c1f4f92a7d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import atexit

def application(environ, start_response):
    def at_exit():
        environ['wsgi.errors'].write('At exit called.\n')
        environ['wsgi.errors'].flush()

    atexit.register(at_exit)

    start_response('200', [('Content-Length', '0')])
    return []