xref: /unit/test/python/atexit/wsgi.py (revision 743:e0f0cd7d244a)
1import atexit
2
3def application(environ, start_response):
4    def at_exit():
5        environ['wsgi.errors'].write('At exit called.\n')
6        environ['wsgi.errors'].flush()
7
8    atexit.register(at_exit)
9
10    start_response('200', [('Content-Length', '0')])
11    return []
12