wsgi.py (552:2e4ea9cc507e) wsgi.py (603:a11b80dedc6b)
1import atexit
2
3def application(environ, start_response):
1import atexit
2
3def application(environ, start_response):
4 test_dir = environ.get('HTTP_TEST_DIR')
4 def at_exit():
5 environ['wsgi.errors'].write('At exit called.')
5
6
6 def create_file():
7 open(test_dir + '/atexit', 'w')
7 atexit.register(at_exit)
8
8
9 atexit.register(create_file)
10
11 start_response('200', [('Content-Length', '0')])
12 return []
9 start_response('200', [('Content-Length', '0')])
10 return []