summaryrefslogblamecommitdiffhomepage
path: root/test/python/atexit/wsgi.py
blob: 9ad300b91e20771bb7f8aad59222ee9ab985f577 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                    
import atexit

def application(environ, start_response):
    test_dir = environ.get('HTTP_TEST_DIR')

    def create_file():
        open(test_dir + '/atexit', 'w')

    atexit.register(create_file)

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